Exemple #1
0
 protected override void NonInteractiveObjectCollision(NonInteractiveObject other)
 {
     //if this Player is colliding with an Item then check to see if it should be picked up
     if (input.pickupDrop && other.GetType().IsSubclassOf(typeof(Item)))
     {
         Item item = (Item)other;
         for (int i = 0; i < PlayerInput.NUM_ITEMS; i++)
         {
             if (input.items(i))
             {
                 item.Pickup(this, i);
                 return;
             }
         }
         item.Pickup(this);
     }
 }
Exemple #2
0
 protected override void NonInteractiveObjectCollision(NonInteractiveObject other)
 {
 }
Exemple #3
0
 public void AddToGame(NonInteractiveObject add)
 {
     addNonInteractives.Add(add);
 }
Exemple #4
0
 public void RemoveFromGame(NonInteractiveObject remove)
 {
     removeNonInteractives.Add(remove);
 }
Exemple #5
0
 //Methods OnTriggerStay2D and OnCollsionEnter2D call depending on what it overlapped/collided with to catagorize the overlap/collsion
 protected abstract void NonInteractiveObjectCollision(NonInteractiveObject other);