Dumpintro implemented
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Core.SaveLoad;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace DamianExperiments.Dump
|
||||
@@ -9,6 +10,9 @@ namespace DamianExperiments.Dump
|
||||
public SpriteRenderer frakkeSprites;
|
||||
public AppleMachine stateMachine;
|
||||
public AppleMachine fenceStateMachine;
|
||||
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource crashingAudio;
|
||||
private PlayableDirector playableDirector;
|
||||
|
||||
private void OnEnable()
|
||||
@@ -24,6 +28,8 @@ namespace DamianExperiments.Dump
|
||||
frakkeSprites.enabled = false;
|
||||
stateMachine.ChangeState("Frakke_Crashed");
|
||||
fenceStateMachine.ChangeState("ramp_broken");
|
||||
audioSource.audioSource.resource = crashingAudio;
|
||||
audioSource.Play(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
19
Assets/Scripts/Sound/AudioCollider.cs
Normal file
19
Assets/Scripts/Sound/AudioCollider.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class AudioCollider : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
Debug.Log("He's here!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Sound/AudioCollider.cs.meta
Normal file
2
Assets/Scripts/Sound/AudioCollider.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd86cfda00f38814a9052d7955f862b4
|
||||
21
Assets/Scripts/StateMachines/Dump/FrakkeGasolineBehaviour.cs
Normal file
21
Assets/Scripts/StateMachines/Dump/FrakkeGasolineBehaviour.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
public class FrakkeGasolineBehaviour : MonoBehaviour
|
||||
{
|
||||
public AppleAudioSource audioSource;
|
||||
public AudioResource askGasolineAudio;
|
||||
public AudioResource checkThisTrickAudio;
|
||||
|
||||
public void PlayAskGasolineAudio()
|
||||
{
|
||||
audioSource.audioSource.resource = askGasolineAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
|
||||
public void PlayCheckThisTrickAudio()
|
||||
{
|
||||
audioSource.audioSource.resource = checkThisTrickAudio;
|
||||
audioSource.Play(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d32a7532dc3a0f4418a186027eaf33ab
|
||||
Reference in New Issue
Block a user