Frakke puzzle implemented
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DamianExperiments.Dump
|
||||
{
|
||||
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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0fe9a1535dd5004ebd1d26e9482be9c
|
||||
@@ -1,20 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DamianExperiments.Dump
|
||||
{
|
||||
public class FrakkeCrashedBehaviour : MonoBehaviour
|
||||
{
|
||||
public Animator FrakkeAnimControllerRef;
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (FrakkeAnimControllerRef != null)
|
||||
{
|
||||
FrakkeAnimControllerRef.SetTrigger("Crashes");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 543c2dad4fc14a740975065cf856b336
|
||||
@@ -1,21 +1,30 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace DamianExperiments.Dump
|
||||
{
|
||||
public class FrakkeRevUpCrashBehaviour : MonoBehaviour
|
||||
{
|
||||
public Animator FrakkeAnimControllerRef;
|
||||
public SpriteRenderer frakkeSprites;
|
||||
public AppleMachine stateMachine;
|
||||
public AppleMachine fenceStateMachine;
|
||||
private PlayableDirector playableDirector;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (FrakkeAnimControllerRef != null)
|
||||
{
|
||||
FrakkeAnimControllerRef.SetTrigger("SpeedsOff");
|
||||
}
|
||||
playableDirector = GetComponent<PlayableDirector>();
|
||||
playableDirector.stopped += DirectorStopped;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void DirectorStopped(PlayableDirector obj)
|
||||
{
|
||||
playableDirector.stopped -= DirectorStopped;
|
||||
frakkeSprites.enabled = false;
|
||||
stateMachine.ChangeState("Frakke_Crashed");
|
||||
fenceStateMachine.ChangeState("ramp_broken");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90c9b2a87d284c5ba24cce60865c31a4
|
||||
timeCreated: 1764669813
|
||||
8
Assets/Scripts/StateMachines/Dump.meta
Normal file
8
Assets/Scripts/StateMachines/Dump.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 907b70dc2fffff44b833e7dab30adf33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using Core.SaveLoad;
|
||||
using Input;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
public class TrashpileGasolineBehavior : MonoBehaviour
|
||||
{
|
||||
private PlayableDirector playableDirector;
|
||||
public SpriteRenderer pulverSprites;
|
||||
public SpriteRenderer pulverDivingSprites;
|
||||
public AppleMachine stateMachine;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
playableDirector = GetComponent<PlayableDirector>();
|
||||
}
|
||||
|
||||
public void TrashDiveStart()
|
||||
{
|
||||
playableDirector.stopped += DirectorStopped;
|
||||
pulverSprites.enabled = false;
|
||||
pulverDivingSprites.enabled = true;
|
||||
playableDirector.Play();
|
||||
}
|
||||
private void DirectorStopped(PlayableDirector obj)
|
||||
{
|
||||
pulverSprites.enabled = true;
|
||||
pulverDivingSprites.enabled = false;
|
||||
playableDirector.stopped -= DirectorStopped;
|
||||
stateMachine.ChangeState("TrashpileWithoutGas");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6733ea2b33ba4314598184e72bddafe5
|
||||
Reference in New Issue
Block a user