public virtual void Attack(Vector2 direction) { if (this.fireClip != null) { AudioPlayer.Play(this.fireClip); } }
public virtual void Use(Actor origin, Vector2 direction) { if (this.useClip != null) { AudioPlayer.Play(this.useClip); } }
private void RemoveObject() { if (this.destroyClip != null) { AudioPlayer.Play(this.destroyClip); } PoolManager.Despawn(this.gameObject); }
public void OnTriggerEnter2D(Collider2D other) { Actor actor = other.GetComponent<Actor>(); if (actor == null) return; Inventory actorInventory = actor.Inventory; if (actorInventory == null) return; if (actorInventory.AcquireItem(this.item)) { if (this.item.ItemData.PickupClip != null) AudioPlayer.Play(this.item.ItemData.PickupClip); PoolManager.Despawn(this.gameObject); } }