コード例 #1
0
 public Soldier(Game.CreatureSide soldierSide, Vector location, int health) :
     base(soldierSide == Game.CreatureSide.Enemy ? Textures.EnemySoldier : Textures.PlayerSoldier, location)
 {
     JumpAcceleration = new Vector(0, 7);
     BulletsInClip    = ClipSize;
     MaxHealth        = health;
     HealthPoints     = health;
     Side             = soldierSide;
     MoveLeftTexture  = (Bitmap)Texture.Clone();
     MoveLeftTexture.RotateFlip(RotateFlipType.RotateNoneFlipX);
     MoveRightTexture = Texture;
 }
コード例 #2
0
 public Projectile(Vector location, Vector velocity, Game.CreatureSide side)
 {
     Velocity = velocity.Copy;
     Location = location.Copy;
     Side     = side;
 }