Added outline settings
This commit is contained in:
@@ -433672,6 +433672,118 @@ MonoBehaviour:
|
|||||||
audioSource: {fileID: 0}
|
audioSource: {fileID: 0}
|
||||||
clipPriority: 0
|
clipPriority: 0
|
||||||
sourcePriority: 0
|
sourcePriority: 0
|
||||||
|
--- !u!1 &338747595
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 338747596}
|
||||||
|
- component: {fileID: 338747598}
|
||||||
|
- component: {fileID: 338747597}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GlowOutline
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &338747596
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 338747595}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1046094549}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &338747597
|
||||||
|
SpriteRenderer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 338747595}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!114 &338747598
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 338747595}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0f935b14e8862e249bdc2bde13bc19fd, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: '::'
|
||||||
|
scaleFactor: 0
|
||||||
|
outlineModes:
|
||||||
|
- interaction: 0
|
||||||
|
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0}
|
||||||
|
- interaction: 1
|
||||||
|
outlineColour: {r: 0.5058824, g: 0.7803922, b: 0.8862746, a: 0}
|
||||||
|
- interaction: 2
|
||||||
|
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0}
|
||||||
--- !u!1 &341893678
|
--- !u!1 &341893678
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -447736,6 +447848,7 @@ Transform:
|
|||||||
- {fileID: 2089128782}
|
- {fileID: 2089128782}
|
||||||
- {fileID: 768267914}
|
- {fileID: 768267914}
|
||||||
- {fileID: 1351976589}
|
- {fileID: 1351976589}
|
||||||
|
- {fileID: 338747596}
|
||||||
m_Father: {fileID: 1471606854}
|
m_Father: {fileID: 1471606854}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &1046094550
|
--- !u!114 &1046094550
|
||||||
@@ -449659,11 +449772,11 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8361739881193827101, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
- target: {fileID: 8361739881193827101, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 7.4399986
|
value: 7.439999
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8361739881193827101, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
- target: {fileID: 8361739881193827101, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 11.469999
|
value: 11.47
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 9074453772172382270, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
- target: {fileID: 9074453772172382270, guid: 4b7426bc1f8736749b68973653f4dbfb, type: 3}
|
||||||
propertyPath: lawnMowerRef
|
propertyPath: lawnMowerRef
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace AppleHills.Core.Settings
|
|||||||
[SerializeField] private float playerStopDistance = 6.0f;
|
[SerializeField] private float playerStopDistance = 6.0f;
|
||||||
[SerializeField] private float playerStopDistanceDirectInteraction = 2.0f;
|
[SerializeField] private float playerStopDistanceDirectInteraction = 2.0f;
|
||||||
[SerializeField] private float followerPickupDelay = 0.2f;
|
[SerializeField] private float followerPickupDelay = 0.2f;
|
||||||
|
[SerializeField] private List<GlowOutlineData> interactionOutlineColors;
|
||||||
|
|
||||||
[Header("InputManager Settings")]
|
[Header("InputManager Settings")]
|
||||||
[Tooltip("Layer(s) to use for interactable objects.")]
|
[Tooltip("Layer(s) to use for interactable objects.")]
|
||||||
@@ -47,6 +48,8 @@ namespace AppleHills.Core.Settings
|
|||||||
public GameObject DefaultPuzzleIndicatorPrefab => defaultPuzzleIndicatorPrefab;
|
public GameObject DefaultPuzzleIndicatorPrefab => defaultPuzzleIndicatorPrefab;
|
||||||
public float DefaultPuzzlePromptRange => defaultPuzzlePromptRange;
|
public float DefaultPuzzlePromptRange => defaultPuzzlePromptRange;
|
||||||
|
|
||||||
|
public List<GlowOutlineData> InteractionOutlineColors => interactionOutlineColors;
|
||||||
|
|
||||||
public override void OnValidate()
|
public override void OnValidate()
|
||||||
{
|
{
|
||||||
base.OnValidate();
|
base.OnValidate();
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ namespace AppleHills.Core.Settings
|
|||||||
GameObject MinigameSwitchMenuPrefab { get; }
|
GameObject MinigameSwitchMenuPrefab { get; }
|
||||||
List<CombinationRule> CombinationRules { get; }
|
List<CombinationRule> CombinationRules { get; }
|
||||||
List<SlotItemConfig> SlotItemConfigs { get; }
|
List<SlotItemConfig> SlotItemConfigs { get; }
|
||||||
|
List<GlowOutlineData> InteractionOutlineColors { get; }
|
||||||
|
|
||||||
// Puzzle settings
|
// Puzzle settings
|
||||||
GameObject DefaultPuzzleIndicatorPrefab { get; }
|
GameObject DefaultPuzzleIndicatorPrefab { get; }
|
||||||
float DefaultPuzzlePromptRange { get; }
|
float DefaultPuzzlePromptRange { get; }
|
||||||
|
|||||||
33
Assets/Scripts/Interactions/GlowOutline.cs
Normal file
33
Assets/Scripts/Interactions/GlowOutline.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class GlowOutline : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
private SpriteRenderer parentSprite;
|
||||||
|
private SpriteRenderer outlineSprite;
|
||||||
|
|
||||||
|
|
||||||
|
public float scaleFactor;
|
||||||
|
public GlowOutlineData[] outlineModes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
SetupOutline();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void SetupOutline()
|
||||||
|
{
|
||||||
|
parentSprite = GetComponentInParent<SpriteRenderer>();
|
||||||
|
outlineSprite = GetComponent<SpriteRenderer>();
|
||||||
|
|
||||||
|
outlineSprite.sprite = parentSprite.sprite;
|
||||||
|
gameObject.transform.localScale = gameObject.transform.localScale * scaleFactor;
|
||||||
|
//outlineSprite.color = outlineColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
2
Assets/Scripts/Interactions/GlowOutline.cs.meta
Normal file
2
Assets/Scripts/Interactions/GlowOutline.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0f935b14e8862e249bdc2bde13bc19fd
|
||||||
9
Assets/Scripts/Interactions/GlowOutlineData.cs
Normal file
9
Assets/Scripts/Interactions/GlowOutlineData.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
public class GlowOutlineData
|
||||||
|
{
|
||||||
|
public enum InteractionType { Pickup, Combine, Interaction };
|
||||||
|
public InteractionType interaction;
|
||||||
|
public Color outlineColour;
|
||||||
|
}
|
||||||
2
Assets/Scripts/Interactions/GlowOutlineData.cs.meta
Normal file
2
Assets/Scripts/Interactions/GlowOutlineData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e30fc1ed343c85742bc48b4c75fb6fbf
|
||||||
@@ -15,6 +15,13 @@ MonoBehaviour:
|
|||||||
playerStopDistance: 10
|
playerStopDistance: 10
|
||||||
playerStopDistanceDirectInteraction: 5
|
playerStopDistanceDirectInteraction: 5
|
||||||
followerPickupDelay: 0.2
|
followerPickupDelay: 0.2
|
||||||
|
interactionOutlineColors:
|
||||||
|
- interaction: 0
|
||||||
|
outlineColour: {r: 1, g: 0.87843144, b: 0.57254905, a: 0}
|
||||||
|
- interaction: 1
|
||||||
|
outlineColour: {r: 0.5058824, g: 0.7803922, b: 0.8862746, a: 0}
|
||||||
|
- interaction: 2
|
||||||
|
outlineColour: {r: 0.62352943, g: 0.62352943, b: 0.8078432, a: 0}
|
||||||
interactableLayerMask:
|
interactableLayerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 1024
|
m_Bits: 1024
|
||||||
|
|||||||
Reference in New Issue
Block a user