public void HandleAttackEnd() { RestrictedMobility = false; Mobile = true; ClientCollider.ActiveCollider = false; ClientCollider.SetCollisionPolygon(rigidBody.CollisionPolygon); ClientCollider.CollisionDamage = Player.DEFAULT_PLAYER_DAMAGE; }
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; }
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); } }