Beispiel #1
0
 public GameScene(int numRows, int numCols)
 {
     random = new Random();
     map = new Map(this, numRows, numCols);
     player = null;
     camera = Vector.Zero;
     players = new ThingList();
     enemies = new ThingList();
     enemyAddList = new ThingList();
     playerBullets = new BulletList();
     enemyBullets = new BulletList();
     items = new ThingList();
     door = null;
     particles = new ParticleList();
     particleAddList = new ParticleList();
     quakeRadius = 0;
     quakeVector = Vector.Zero;
     flash = 0;
     numTicks = 0;
     cleared = false;
     clearTimer = 0;
     gameoverTimer = 0;
     gameover = false;
     backgroundParticles = new ParticleList();
     audio = null;
 }
Beispiel #2
0
 public EndingScene()
 {
     currentState = State.None;
     numTicks = 0;
     forceExit = false;
     forceExitCount = 0;
     audio = null;
 }
Beispiel #3
0
        public StageSelectScene(int numUnlockedStages, int initStageIndex)
        {
            this.numUnlockedStages = numUnlockedStages;
            currentStageIndex = initStageIndex;
            currentState = State.None;
            gotoGame = false;
            gotoGameCount = 0;

            audio = null;
        }
        public MiswGame2007Application()
        {
            {
                FileArchiverZip zip = new FileArchiverZip();
                zip.ZipExtName = ".btw";
                FileSys.Archiver.Add(zip);
            }
            UnmanagedResourceManager.Instance.VideoMemory.LimitSize = 64 * 1024 * 1024;
            settings = new Settings("settings.cfg");
            CreateWindow(settings.Fullscreen);
            inputDevice = new InputDevice(!settings.Fullscreen, settings.JumpButton, settings.AttackButton, settings.StartButton);
            graphicsDevice = new GraphicsDevice(window);
            audioDevice = new AudioDevice();
            LoadStageData();

            title = new TitleScene(0, settings.ArcadeMode);
            title.AudioDevice = audioDevice;
            currentState = State.Title;
            currentStageIndex = settings.StartStageIndex;
            if (settings.StartStageIndex < settings.NumUnlockedStages)
            {
                numUnlockedStages = settings.NumUnlockedStages;
            }
            else
            {
                numUnlockedStages = settings.StartStageIndex + 1;
            }

            if (numUnlockedStages < 25)
            {
                numUnlockedStages = 25;
            }

            log = null;
            if (settings.ArcadeMode)
            {
                for (int i = 1; i <= 9999; i++)
                {
                    if (!File.Exists("log" + (10000 + i).ToString().Substring(1) + ".txt"))
                    {
                        log = new StreamWriter("log" + (10000 + i).ToString().Substring(1) + ".txt");
                        break;
                    }
                }
            }
        }
Beispiel #5
0
 public TitleScene(int selectIndex, bool arcadeMode)
 {
     currentState  = State.None;
     gotoGame      = false;
     gotoGameCount = 0;
     exit          = false;
     exitCount     = 0;
     numTicks      = 0;
     titleMap      = new int[16, 21];
     for (int row = 0; row < 16; row++)
     {
         for (int col = 0; col < 21; col++)
         {
             titleMap[row, col] = 0;
         }
     }
     game               = new GameSceneForTitleScene(16, 21);
     game.Camera        = new Vector(16, 16);
     currentSelectIndex = selectIndex;
     this.arcadeMode    = arcadeMode;
     audio              = null;
 }
Beispiel #6
0
 public TitleScene(int selectIndex, bool arcadeMode)
 {
     currentState = State.None;
     gotoGame = false;
     gotoGameCount = 0;
     exit = false;
     exitCount = 0;
     numTicks = 0;
     titleMap = new int[16, 21];
     for (int row = 0; row < 16; row++)
     {
         for (int col = 0; col < 21; col++)
         {
             titleMap[row, col] = 0;
         }
     }
     game = new GameSceneForTitleScene(16, 21);
     game.Camera = new Vector(16, 16);
     currentSelectIndex = selectIndex;
     this.arcadeMode = arcadeMode;
     audio = null;
 }
Beispiel #7
0
        public GameScene(StageData data)
        {
            random = new Random();
            map    = data.GetMap(this);
            // player = new Player(this, 6, 1, Player.Direction.Right);
            player = data.GetPlayer(this);
            MoveCameraFast(player.Focus);
            players = new ThingList();
            players.AddThing(player);
            // enemies = new ThingList();
            enemies             = data.GetEnemies(this);
            enemyAddList        = new ThingList();
            playerBullets       = new BulletList();
            enemyBullets        = new BulletList();
            items               = new ThingList();
            door                = data.GetExitDoor(this);
            particles           = new ParticleList();
            particleAddList     = new ParticleList();
            quakeRadius         = 0;
            quakeVector         = Vector.Zero;
            flash               = 0;
            numTicks            = 0;
            cleared             = false;
            clearTimer          = 0;
            gameoverTimer       = 0;
            gameover            = false;
            backgroundParticles = new ParticleList();

            audio = null;

            /*
             * enemies.AddThing(new TestEnemy(this, 7, 24, TestEnemy.Direction.Left));
             * enemies.AddThing(new TestEnemy(this, 12, 11, TestEnemy.Direction.Left));
             * enemies.AddThing(new TestEnemy(this, 12, 24, TestEnemy.Direction.Left));
             * enemies.AddThing(new TestEnemy(this, 16, 8, TestEnemy.Direction.Left));
             * enemies.AddThing(new TestEnemy(this, 22, 17, TestEnemy.Direction.Left));
             */
        }
Beispiel #8
0
        public GameScene(StageData data)
        {
            random = new Random();
            map = data.GetMap(this);
            // player = new Player(this, 6, 1, Player.Direction.Right);
            player = data.GetPlayer(this);
            MoveCameraFast(player.Focus);
            players = new ThingList();
            players.AddThing(player);
            // enemies = new ThingList();
            enemies = data.GetEnemies(this);
            enemyAddList = new ThingList();
            playerBullets = new BulletList();
            enemyBullets = new BulletList();
            items = new ThingList();
            door = data.GetExitDoor(this);
            particles = new ParticleList();
            particleAddList = new ParticleList();
            quakeRadius = 0;
            quakeVector = Vector.Zero;
            flash = 0;
            numTicks = 0;
            cleared = false;
            clearTimer = 0;
            gameoverTimer = 0;
            gameover = false;
            backgroundParticles = new ParticleList();

            audio = null;

            /*
            enemies.AddThing(new TestEnemy(this, 7, 24, TestEnemy.Direction.Left));
            enemies.AddThing(new TestEnemy(this, 12, 11, TestEnemy.Direction.Left));
            enemies.AddThing(new TestEnemy(this, 12, 24, TestEnemy.Direction.Left));
            enemies.AddThing(new TestEnemy(this, 16, 8, TestEnemy.Direction.Left));
            enemies.AddThing(new TestEnemy(this, 22, 17, TestEnemy.Direction.Left));
            */
        }