예제 #1
0
파일: Scene-Bullet.cs 프로젝트: jeala/DEPW
 public Bullet(Texture2D tex, Vector2 pos, Vector2 cSize, Vector2 wSize,
               Vector2 playerPos, int bSpeed, int bDamage)
 {
     position = pos;
     characterSize = cSize;
     windowSize = wSize;
     playerPosition = playerPos;
     bulletSpeed = bSpeed;
     bulletDamage = bDamage;
     isValid = true;
     anim = new Helper_Animation(tex, pos, 2, 100, 0, 0, 10, 10);
 }
예제 #2
0
 public Player(Texture2D tex, Texture2D jtex, Texture2D jtex2, Vector2 pos, Vector2 vel,
                          Vector2 cSize, Vector2 wSize)
 {
     texture = tex;
     position = pos;
     velocity = vel;
     characterSize = cSize;
     windowSize = wSize;
     score = 0;
     startBoost = false;
     health = 100;
     wasHit = false;
     jet1 = new Helper_Animation(jtex, new Vector2(pos.X, (float)pos.Y - 80), 2, 100, 0, 0, 26, 6);
     jet2 = new Helper_Animation(jtex2, new Vector2(pos.X, (float)pos.Y - 80), 2, 100, 0, 0, 26, 9);
 }
예제 #3
0
 public Player(Texture2D tex, Texture2D jtex, Texture2D jtex2, Vector2 pos,
     Vector2 vel, Vector2 cSize, Vector2 wSize, int cScore, int cHealth)
 {
     texture = tex;
     position = pos;
     velocity = vel;
     characterSize = cSize;
     windowSize = wSize;
     score = cScore;
     startBoost = false;
     health = cHealth;
     wasHit = false;
     maxAddSub = 20;
     maxMul = 10;
     maxDiv = 30;
     jet1 = new Helper_Animation(jtex, new Vector2(pos.X, (float)pos.Y - 80),
                                                        2, 100, 0, 0, 26, 6);
     jet2 = new Helper_Animation(jtex2, new Vector2(pos.X, (float)pos.Y - 80),
                                                        2, 100, 0, 0, 26, 9);
 }
예제 #4
0
 public void InitializeAnim(Texture2D tex, int framenum,
     int millisec, int width, int height)
 {
     anim = new Helper_Animation(tex, position, framenum,
                          millisec, 0, 0, width, height);
     characterSize = new Vector2(tex.Width / anim.frames, tex.Height);
 }