MVP for Dump Puzzle
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEditor.Animations;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class FrakkeAnimEventTrigger : MonoBehaviour
|
||||
{
|
||||
[Header("Frakke Crashing References")]
|
||||
public AppleMachine FrakkeSMRef;
|
||||
public GameObject stateToChangeToAfterCrashing;
|
||||
|
||||
[Header("Fence Breaking References")]
|
||||
public AppleMachine FenceSMRef;
|
||||
public GameObject FenceStateToSet;
|
||||
|
||||
public void OnFrakkeCrashEnded()
|
||||
{
|
||||
FrakkeSMRef.ChangeState(stateToChangeToAfterCrashing);
|
||||
}
|
||||
|
||||
public void OnFenceBroken()
|
||||
{
|
||||
if (FenceSMRef != null)
|
||||
{
|
||||
FenceSMRef.ChangeState(FenceStateToSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("FrakkeRevUpCrashBehaviour: FenceSMRef is not assigned.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user