Exemple #1
0
 public ItemLib(Vector2 position, int width, int height, PlayerLib playerLib)
 {
     Position   = position;
     _width     = width;
     _height    = height;
     _playerLib = playerLib;
 }
Exemple #2
0
 public MediPackLib(Vector2 position, int width, int height, PlayerLib playerLib)
 {
     _position  = position;
     _width     = width;
     _height    = height;
     _playerLib = playerLib;
 }
Exemple #3
0
 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;
     }
 }
Exemple #4
0
 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;
     }
 }
Exemple #5
0
 public JetPackLib(Vector2 position, int width, int height, PlayerLib playerLib)
     : base(position, width, height, playerLib)
 {
 }