Clop Sound Added
This commit is contained in:
13
Assets/Scripts/Player/Clop.cs
Normal file
13
Assets/Scripts/Player/Clop.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Player
|
||||
{
|
||||
public class Clop : MonoBehaviour
|
||||
{
|
||||
private AudioSource audioSource = null;
|
||||
|
||||
private void Start() => audioSource = GetComponent<AudioSource>();
|
||||
|
||||
public void PlayClop() => audioSource.Play();
|
||||
}
|
||||
}
|
11
Assets/Scripts/Player/Clop.cs.meta
Normal file
11
Assets/Scripts/Player/Clop.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7cadde1ece49514692994af78ed765e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -50,6 +50,7 @@ namespace Player
|
||||
private const string IsWalledParameter = "IsWalled";
|
||||
private Animator animator = null;
|
||||
private Death death = null;
|
||||
private Clop clop = null;
|
||||
private CollisionChecker enemyTrigger = null;
|
||||
|
||||
private void Awake()
|
||||
@@ -77,6 +78,7 @@ namespace Player
|
||||
animator = GetComponent<Animator>();
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
death = transform.Find("Death").gameObject.GetComponent<Death>();
|
||||
clop = transform.Find("Clop").gameObject.GetComponent<Clop>();
|
||||
enemyTrigger = GameObject.Find("Enemy Trigger").GetComponent<CollisionChecker>();
|
||||
|
||||
BaseSpeed = 0.0f;
|
||||
@@ -288,5 +290,7 @@ namespace Player
|
||||
Left = -1,
|
||||
Right = 1
|
||||
}
|
||||
|
||||
public void Clop() => clop.PlayClop();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user