Пример #1
0
 public void HandleAttackEnd()
 {
     RestrictedMobility            = false;
     Mobile                        = true;
     ClientCollider.ActiveCollider = false;
     ClientCollider.SetCollisionPolygon(rigidBody.CollisionPolygon);
     ClientCollider.CollisionDamage = Player.DEFAULT_PLAYER_DAMAGE;
 }
Пример #2
0
        public DamageableEntity(float initialHealth, int initialLives, Polygon collisionPolygon, GameMap gameMap)
        {
            clientCollider = new ClientCollider(collisionPolygon, HandleCollision);
            gameMap.AddEntity(clientCollider);

            currentLives       = initialLives;
            currentHealth      = initialHealth;
            this.initialHealth = initialHealth;
        }
Пример #3
0
        protected override void Update(GameTime gameTime, KeyboardState keyboardState, KeyboardState pastKeyboardState, MouseState mouseState, MouseState pastMouseState, GameMap map)
        {
            SpriteManager.Update(gameTime);
            ClientCollider.SetFacingState(SpriteManager.FacingState);

            //Ensure in bounds
            if (rigidBody.CollisionPolygon.CenterPoint.Y > MapStandards.MAP_SIZE)
            {
                ApplyDamage(float.MaxValue, map.gameSession);
            }
        }