예제 #1
0
 /**
 * Fonctions pour detruire un bloc en fonction de la vie de celui ci
 */
 public void destroy(Blocks block)
 {
     if (this.TimerAttack == 2)
     {
         block.Health -= this._strength;
         if (block.Health <= 0)
             block.IsActive = false;
     }
 }
예제 #2
0
 /*
 * Fonction pour grimper sur un caisse
 */
 public void ClimbBox(Blocks block, int dir)
 {
     if (dir == 1)
     {
         this._hitBox.X -= block.HitBox.Width;
         this._hitBox.Y -= block.HitBox.Height;
     }
     else if (dir == 0)
     {
         this._hitBox.X += block.HitBox.Width;
         this._hitBox.Y -= block.HitBox.Height;
     }
 }