get theme colours from engine instead of storing reference to theme in module

This commit is contained in:
2022-11-28 22:14:00 +01:00
parent 8398d29f25
commit 60e390a993
32 changed files with 151 additions and 14 deletions

View File

@@ -0,0 +1,27 @@
using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules;
using JetBrains.Annotations;
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Desert.Runtime.Puzzle_B
{
public class PuzzleB : StatePuzzle
{
[ValidateInput("CorrectRotatorCount")]
public List<Transform> rotators;
protected override void StatesUpdate()
{
base.StatesUpdate();
for (var i = 0; i < stateCount; i++)
{
rotators[i].localRotation = Quaternion.AngleAxis(states[i], Vector3.up);
}
}
[UsedImplicitly]
private bool CorrectRotatorCount(List<Transform> list) => list != null && list.Count == stateCount;
}
}