merge EmissionToggle and EmissionColor into one, deprecates RingLight
This commit is contained in:
@@ -203,6 +203,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 17de1e2991b64847bceea06f966f0560, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 8, g: 3.5137255, b: 0, a: 1}
|
||||
--- !u!114 &588859562845345223
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -313,6 +314,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 17de1e2991b64847bceea06f966f0560, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 8, g: 3.5137255, b: 0, a: 1}
|
||||
--- !u!114 &1496886773925654589
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -436,6 +438,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 17de1e2991b64847bceea06f966f0560, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 8, g: 3.5137255, b: 0, a: 1}
|
||||
--- !u!1 &3567493004391185636
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -448,8 +451,6 @@ GameObject:
|
||||
- component: {fileID: 3885302599737197913}
|
||||
- component: {fileID: 8071682251213623948}
|
||||
- component: {fileID: 1320470883464003968}
|
||||
- component: {fileID: 2937406622804644192}
|
||||
- component: {fileID: 2447623283058598807}
|
||||
m_Layer: 0
|
||||
m_Name: Light
|
||||
m_TagString: Untagged
|
||||
@@ -534,31 +535,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 17de1e2991b64847bceea06f966f0560, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &2937406622804644192
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3567493004391185636}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59658196528346f7a5af3e879a1a8af1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
--- !u!114 &2447623283058598807
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3567493004391185636}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a8f20dfd8ae64b4d87b98590269b7298, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &3629096364680104226
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -656,6 +633,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 17de1e2991b64847bceea06f966f0560, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
color: {r: 8, g: 3.5137255, b: 0, a: 1}
|
||||
--- !u!114 &8332558567568654656
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -950,8 +928,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
theme: {fileID: 11400000, guid: 568d9a7d70f3edb4cb6db66a0010f105, type: 2}
|
||||
animator: {fileID: 0}
|
||||
ringLight: {fileID: 2447623283058598807}
|
||||
ringLight: {fileID: 1320470883464003968}
|
||||
ring: {fileID: 5086091638728871387}
|
||||
--- !u!95 &2153737246840746917
|
||||
Animator:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Escape_Room_Engine.Desert.Scripts;
|
||||
using Escape_Room_Engine.Engine.Scripts.Modules;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
@@ -10,7 +11,7 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
{
|
||||
private static readonly int LightFlash = Animator.StringToHash("Light Flash");
|
||||
|
||||
[BoxGroup("Internal")] [Required] public RingLight ringLight;
|
||||
[BoxGroup("Internal")] [Required] public Emission ringLight;
|
||||
[BoxGroup("Internal")] [Required] public Ring ring;
|
||||
|
||||
private Animator _animator;
|
||||
@@ -32,11 +33,11 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
break;
|
||||
case PuzzleEventType.Solved:
|
||||
ring.Solved = true;
|
||||
ringLight.Color = theme.solvedColor;
|
||||
ringLight.color = theme.solvedColor;
|
||||
TurnOnRingLight();
|
||||
break;
|
||||
case PuzzleEventType.WrongInput:
|
||||
ringLight.Color = theme.puzzleColor;
|
||||
ringLight.color = theme.puzzleColor;
|
||||
_animator.SetTrigger(LightFlash);
|
||||
break;
|
||||
default:
|
||||
@@ -47,12 +48,12 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
|
||||
public void TurnOnRingLight()
|
||||
{
|
||||
ringLight.Active = true;
|
||||
ringLight.active = true;
|
||||
}
|
||||
|
||||
public void TurnOffRingLight()
|
||||
{
|
||||
ringLight.Active = false;
|
||||
ringLight.active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
{
|
||||
[RequireComponent(typeof(EmissionToggle))]
|
||||
[RequireComponent(typeof(Emission))]
|
||||
public class Crystal : MonoBehaviour
|
||||
{
|
||||
[Required] public Light crystalLight;
|
||||
@@ -19,11 +19,11 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
private EmissionToggle _emission;
|
||||
private Emission _emission;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_emission = GetComponent<EmissionToggle>();
|
||||
_emission = GetComponent<Emission>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using Escape_Room_Engine.Desert.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
{
|
||||
[RequireComponent(typeof(EmissionToggle), typeof(EmissionColor))]
|
||||
public class RingLight : MonoBehaviour
|
||||
{
|
||||
public bool Active
|
||||
{
|
||||
get => _emissionToggle.active;
|
||||
set
|
||||
{
|
||||
_emissionToggle.active = value;
|
||||
}
|
||||
}
|
||||
public Color Color
|
||||
{
|
||||
get => _emissionColor.color;
|
||||
set => _emissionColor.color = value;
|
||||
}
|
||||
|
||||
private EmissionToggle _emissionToggle;
|
||||
private EmissionColor _emissionColor;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_emissionToggle = GetComponent<EmissionToggle>();
|
||||
_emissionColor = GetComponent<EmissionColor>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8f20dfd8ae64b4d87b98590269b7298
|
||||
timeCreated: 1668704631
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
{
|
||||
[RequireComponent(typeof(EmissionToggle))]
|
||||
[RequireComponent(typeof(Emission))]
|
||||
public class Symbol : MonoBehaviour
|
||||
{
|
||||
public float anglePosition;
|
||||
@@ -17,11 +17,11 @@ namespace Escape_Room_Engine.Desert.Modules.Puzzle_A.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
private EmissionToggle _emission;
|
||||
private Emission _emission;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_emission = GetComponent<EmissionToggle>();
|
||||
_emission = GetComponent<Emission>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
||||
Reference in New Issue
Block a user