Ejemplo n.º 1
0
 public virtual void Attack(Vector2 direction)
 {
     if (this.fireClip != null)
     {
         AudioPlayer.Play(this.fireClip);
     }
 }
Ejemplo n.º 2
0
 public virtual void Use(Actor origin, Vector2 direction)
 {
     if (this.useClip != null)
     {
         AudioPlayer.Play(this.useClip);
     }
 }
Ejemplo n.º 3
0
        private void RemoveObject()
        {
            if (this.destroyClip != null)
            {
                AudioPlayer.Play(this.destroyClip);
            }

            PoolManager.Despawn(this.gameObject);
        }
Ejemplo n.º 4
0
        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);
            }
        }