public ItemLib(Vector2 position, int width, int height, PlayerLib playerLib) { Position = position; _width = width; _height = height; _playerLib = playerLib; }
public MediPackLib(Vector2 position, int width, int height, PlayerLib playerLib) { _position = position; _width = width; _height = height; _playerLib = playerLib; }
public void ReceiveDamage(PlayerLib playerLib) { if (GetDistanceTo(PlayerLib.Position).X < 0.1) { Movement += Vector2.UnitX * 5f; } if (GetDistanceTo(PlayerLib.Position).X > 0.1) { Movement -= Vector2.UnitX * 5f; } }
public void MakeDamageWithSlim(PlayerLib playerLib) { if (GetDistanceTo(PlayerLib.Position).X < 0.1) { Movement += Vector2.UnitX * 20f; playerLib.Movement -= Vector2.UnitX * 10f; playerLib.Movement -= Vector2.UnitY * 5f; } if (GetDistanceTo(PlayerLib.Position).X > 0.1) { Movement -= Vector2.UnitX * 20f; playerLib.Movement += Vector2.UnitX * 10f; playerLib.Movement -= Vector2.UnitY * 5f; } }
public JetPackLib(Vector2 position, int width, int height, PlayerLib playerLib) : base(position, width, height, playerLib) { }