public GameScreen(Game1 game) { this.game = game; this.runState = GameState.FadeIn; loadNewLevel(); }
public TitleScreen(Game1 game, string label, Texture2D font, Vector2 pos) { this.game = game; this.label = label; this.font = font; this.posi = pos; this.runState = TitleState.DisplayText; }
public Bullet(Map map, Vector2 loc, Game1.Directions dir, Game1.Aspects asp) { currentMap = map; location = loc; moveDir = dir; aspect = asp; inert = false; texture = new Rectangle(0, (int)asp * 6, 6, 6); }
public Enemy(EnemyDef ident, Vector2 loc, Map map, GameScreen screen, Game1.Aspects aspect = Game1.Aspects.None) { this.identity = ident; this.location = loc; this.currentMap = map; this.currentScreen = screen; this.faceDir = Game1.Directions.Down; this.currentFrame = 0; this.stallCount = 0; if (aspect == Game1.Aspects.None) this.aspect = (Game1.Aspects)r.Next(0, 3); else this.aspect = aspect; }
public bool takeDamage(Game1.Aspects asp) { // Returns true if enemy is killed if (asp == this.aspect) return true; else return false; }
private void Move(Game1.Directions move_dir) { Vector2 move_vec = new Vector2(0, 0); switch (move_dir) { case Game1.Directions.Down: move_vec = new Vector2(0, 2); break; case Game1.Directions.Up: move_vec = new Vector2(0, -2); break; case Game1.Directions.Left: move_vec = new Vector2(-2, 0); break; case Game1.Directions.Right: move_vec = new Vector2(2, 0); break; default: break; // Something has gone wrong } this.Move(move_vec); }
static void Main() { using (var game = new Game1()) game.Run(); }
public TitleScreen(Game1 game) { this.runState = TitleState.TitleScreen; this.game = game; this.font = Game1.texCollection.arcadeFont; }