예제 #1
0
 public Sounds(Game game, GameMode gameMode)
     : base(game)
 {
     this.gameMode = gameMode;
     // TODO: Construct any child components here
     prevLens = gameMode.ActiveLens;
 }
예제 #2
0
파일: Goal.cs 프로젝트: rfreim1/Tranquility
        public Goal(Game game, GameMode gm, Vector3 position, Vector3 widths)
            : base(game)
        {
            gameMode = gm;
            _boundingBox = new BoundingBox(position,position+widths);

            // TODO: Construct any child components here
        }
예제 #3
0
 public Stalker(Game1 game, GameMode gm)
     : base(game)
 {
     // TODO: Construct any child components here
     Size = Vector3.One/4;
     Position = Vector3.Zero;
     _gameMode = gm;
     prevLens = gm.ActiveLens;
 }
예제 #4
0
        public LevelComponent(Game1 game, GameMode gameMode, string wallsFile)
            : base((Game)game)
        {
            this.gameMode = gameMode;
            WallsFile = wallsFile;
            System.IO.Stream stream = TitleContainer.OpenStream(wallsFile);
            XDocument doc = XDocument.Load(stream);

            Walls = ReadWalls(doc);
            Coins = ReadCoins(doc);
            Traps = ReadTraps(doc);

            Goal = ReadGoal(doc);
        }
예제 #5
0
파일: Coin.cs 프로젝트: rfreim1/Tranquility
 public Coin(Game game, GameMode gameMode)
     : base(game)
 {
     this.gameMode = gameMode;
 }
예제 #6
0
파일: Lens.cs 프로젝트: rfreim1/Tranquility
 public Lens(Game game, GameMode gameMode)
     : base(game)
 {
     // TODO: Construct any child components here
     this.gameMode = gameMode;
 }
예제 #7
0
 public RedLens(Game game, GameMode gameMode)
     : base(game, gameMode)
 {
     // TODO: Construct any child components here
 }
예제 #8
0
 public void WinGame()
 {
     victoryScreen = new VictoryScreen(this, SpriteBatch);
     activeScreen = Screen.VictoryScreen;
     List<GameComponent> toRemove = new List<GameComponent>();
     foreach (GameComponent component in Components)
     {
         if (component is Wall || component is Trap || component is Coin ||
             component is Lens || component is Player || component is Sounds ||
             component is HUD || component is Goal || component is Stalker) toRemove.Add(component);
     }
     foreach (GameComponent gameComponent in toRemove)
     {
         Components.Remove(gameComponent);
     }
     gameMode = null;
 }
예제 #9
0
 public void startGameMode()
 {
     gameMode = new GameMode(this);
     activeScreen = Screen.GameMode;
     startScreen = null;
     gameOverScreen = null;
 }
예제 #10
0
 public void GameOver()
 {
     gameOverScreen = new GameOverScreen(this, SpriteBatch, Sprite);
     activeScreen = Screen.GameOverScreen;
     gameMode = null;
     List<GameComponent>toRemove = new List<GameComponent>();
     foreach (GameComponent component in Components)
     {
         if (component is Wall || component is Trap || component is Coin ||
             component is Lens || component is Player || component is Sounds ||
             component is HUD || component is Goal || component is Stalker)toRemove.Add(component);
     }
     foreach (GameComponent gameComponent in toRemove)
     {
         Components.Remove(gameComponent);
     }
 }
예제 #11
0
 public Level01(Game1 game, GameMode gameMode)
     : base(game, gameMode, "Content\\level_01.xml")
 {
 }
예제 #12
0
파일: Trap.cs 프로젝트: rfreim1/Tranquility
 public Trap(Game game, GameMode gameMode)
     : base(game)
 {
     this.gameMode = gameMode;
     // TODO: Construct any child components here
 }