Further updates to state machines

This commit is contained in:
Michal Pikulski
2025-11-05 13:48:25 +01:00
parent 15fe4bdce6
commit 210823344a
25 changed files with 2209 additions and 4382 deletions

View File

@@ -14,20 +14,17 @@ namespace StateMachines.Quarry.AnneLise
public UnityEvent animFlash;
public UnityEvent animStart;
void Start()
{
// Find references that are needed regardless of enter/restore
_playerCharacter = GameObject.FindWithTag("Player");
_playerTouchController = _playerCharacter.GetComponent<PlayerTouchController>();
}
/// <summary>
/// Called when entering this state during normal gameplay.
/// Initiates player movement and triggers photo-taking sequence.
/// </summary>
public override void OnEnterState()
{
// Find references that are needed regardless of enter/restore
_playerCharacter = GameObject.FindWithTag("Player");
_playerTouchController = _playerCharacter.GetComponent<PlayerTouchController>();
// Subscribe to player arrival event
_playerTouchController.OnArrivedAtTarget += PlayerHasArrived;