private void walk(CharacterEnums.EDirection dir)
 {
     if (dir == CharacterEnums.EDirection.RIGHT)
     {
         xCoordinate += getWalkSpeed();
         animSet.currentAnimation = animSet.rightWalk;
     }
     else
     {
         xCoordinate -= getWalkSpeed();
         animSet.currentAnimation = animSet.leftWalk;
     }
 }
Example #2
0
 public Bullet(CharacterEnums.EDirection direction, Vector2 startLocation, int damage, HittableTarget target, Castle enemyCastle)
     : base(direction, startLocation, damage, target, enemyCastle)
 {
     location         = startLocation;
     this.target      = target;
     this.damage      = damage;
     this.speed       = getSpeed();
     this.moving      = direction;
     this.enemyCastle = enemyCastle;
     if (moving == CharacterEnums.EDirection.LEFT)
     {
         this.speed *= -1;
     }
     text = getTexture();
 }
Example #3
0
 public AirStrike(CharacterEnums.EDirection direction, Vector2 startLocation, int damage, HittableTarget target, Castle enemyCastle)
     : base(direction, startLocation, damage, target, enemyCastle)
 {
     this.target      = target;
     this.damage      = damage;
     this.enemyCastle = enemyCastle;
     targetMarker     = getTargetMarker();
     payload          = getPayload();
     if (target.myType == CharacterEnums.EType.AIR)
     {
         finalDestination = Constants.airHeight;
     }
     else
     {
         finalDestination = Constants.groundHeight;
     }
 }
Example #4
0
 public Projectile(CharacterEnums.EDirection direction, Vector2 startLocation, int damage, HittableTarget target, Castle enemyCastle)
 {
 }
Example #5
0
 public SateliteStrike(CharacterEnums.EDirection direction, Vector2 startLocation, int damage, HittableTarget target, Castle enemyCastle)
     : base(direction, startLocation, damage, target, enemyCastle)
 {
 }
Example #6
0
 public TankBullet(CharacterEnums.EDirection direction, Vector2 startLocation, int damage, HittableTarget target, Castle enemyCastle)
     : base(direction, startLocation, damage, target, enemyCastle)
 {
 }