Clop Sound Added

This commit is contained in:
2022-02-26 19:00:15 +03:00
parent 1ce2607602
commit 16ed3fe8c4
9 changed files with 235 additions and 0 deletions

View 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();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c7cadde1ece49514692994af78ed765e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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();
}
}