Frakke puzzle implemented
This commit is contained in:
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