finish puzzle a logic
This commit is contained in:
@@ -6,26 +6,15 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
{
|
||||
public class Ring : MonoBehaviour
|
||||
{
|
||||
public bool rotating = true;
|
||||
public float rotationAngle;
|
||||
[MinMaxSlider(-180, 180)] public Vector2 activeRange;
|
||||
[Required] public Crystal crystal;
|
||||
public List<Symbol> symbols;
|
||||
|
||||
public bool Solved
|
||||
{
|
||||
set
|
||||
{
|
||||
_solved = value;
|
||||
crystal.Active = !_solved;
|
||||
symbols.ForEach(symbol => symbol.Active = !_solved);
|
||||
}
|
||||
}
|
||||
|
||||
private bool _solved;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(!_solved)
|
||||
if(rotating)
|
||||
{
|
||||
transform.localRotation = Quaternion.AngleAxis(rotationAngle, Vector3.forward);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user