示例#1
0
 public void PlayerInteraction(GameObject other)
 {
     if (other is Player.Player)
     {
         Player.Player p = (Player.Player)other;
         playSoundBool = true;
         taken         = true;
         active        = true;
         this.hitbox   = Rectangle.Empty;
     }
 }
 public override void intersects(GameObject other)
 {
     if (other is Player.Player)
     {
         Player.Player p = (Player.Player)other;
         Debug.Write("Player health rose from " + p.health);
         p.health = p.health + hpPlus;
         Debug.WriteLine(" to :" + p.health);
         this.hitbox = Rectangle.Empty;
         this.taken  = true;
     }
 }