Finished secretary

This commit is contained in:
2025-12-02 14:49:55 +01:00
parent 8da24e3ea3
commit 2589e56bda
129 changed files with 16110 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
using UnityEngine;
using Core.Lifecycle;
using Core.SaveLoad;
public class AnimationEvents : ManagedBehaviour
{
[HideInInspector]
public AppleMachine stateMachine;
internal override void OnManagedAwake()
{
stateMachine = GetComponentInParent<AppleMachine>();
if (stateMachine == null)
{
Debug.Log($"[AnimationEvent] Animated state {name} does not have a valid state machine!");
}
}
public void AnimSwitchState(string stateToGoTo)
{
stateMachine.ChangeState(stateToGoTo);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b7d19342242409e4583ce050712ec0c5

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using Core.Lifecycle;
using Core.SaveLoad;
using System.Collections;
public class CanStealFlowerStateBehaviour : AppleState
{
public ReceptionistBehaviour receptionistObject;
public override void OnEnterState()
{
StartCoroutine(holdStateForSeconds(receptionistObject.holdFlowerDuration));
}
public override void OnRestoreState(string data)
{
base.OnRestoreState(data);
StartCoroutine(holdStateForSeconds(receptionistObject.holdFlowerDuration));
}
IEnumerator holdStateForSeconds(int seconds)
{
yield return new WaitForSeconds(seconds);
ChangeState("ThrowAwayFlower");
yield return null;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c58863fe98ab1064883ff19770b1fe73

View File

@@ -0,0 +1,15 @@
using UnityEngine;
using Core.Lifecycle;
using Core.SaveLoad;
public class ReceptionistBehaviour : MonoBehaviour
{
public int holdFlowerDuration;
public bool flowerWasStolen;
public void FlowerHasBeenStolen()
{
flowerWasStolen = true;
GetComponentInChildren<AppleMachine>().ChangeState("FlowerWasStolen");
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 09b8ca1e43adc5d479def14f3927b5bb