コード例 #1
0
ファイル: Bullet.cs プロジェクト: caijo/StarDefense
 public Bullet(Texture2D texture)
 {
     asRight = new AnimatedSprite(texture, 0, 0, 16, 1, 1);
     asRight.IsAnimating = false;
     asLeft = new AnimatedSprite(texture, 16, 0, 16, 1, 1);
     asRight.IsAnimating = false;
     iFacing = 0;
     iX = 0;
     iY = 0;
     bActive = false;
 }
コード例 #2
0
ファイル: Enemy.cs プロジェクト: kozlowsk14/SpaceGame
        public Enemy(Texture2D texture,
              int X, int Y, int W, int H, int Frames)
        {
            asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);

            //50 50 chance of going in either direction
            int direction = rndGen.Next(0,2);
            if(direction == 0){
                iDirection = 1;
            }
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: caijo/StarDefense
 public Player(Texture2D texture)
 {
     asSprite = new AnimatedSprite(texture, 0, 0, 72, 16, 4);
     asSprite.IsAnimating = false;
 }
コード例 #4
0
ファイル: Explosion.cs プロジェクト: caijo/StarDefense
 public Explosion(Texture2D texture,
          int X, int Y, int W, int H, int Frames)
 {
     asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);
     asSprite.FrameLength = 0.05f;
 }
コード例 #5
0
ファイル: Enemy.cs プロジェクト: caijo/StarDefense
 public Enemy(Texture2D texture,
       int X, int Y, int W, int H, int Frames)
 {
     asSprite = new AnimatedSprite(texture, X, Y, W, H, Frames);
 }