コード例 #1
0
        public ObjectShooter()
        {
            explosion = new Explosion(16);
            explosion.Scale = 0.5f;

            MainTimer = new Timer();
            MainTimer.Interval = 10;
            angle = new Vector(0f, 0f, 0f);

            model.ScaleFactor = 0.01f;
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: overdrivek/severed-infinity
        public static void InitializeGame()
        {
            //initialize explosion pool
            explosionPool = new Explosion[GameplayConstants.ExplosionPoolSize];
            for (int i = 0; i < GameplayConstants.ExplosionPoolSize; ++i)
                explosionPool[i] = new Explosion(32, true);
            MainWindow.Add3DChildren(explosionPool);

            //initialize empty score table
            Score = new Dictionary<ModelManager.ManagedModel, int>();
            foreach (var model in ModelManager.modelBank)
                Score.Add(model, 0);
            scoreTable = new ScoreTable(MainWindow);

            //for restart level to work, we set the current level to -1
            CurrentLevel = -1;

            mainGun = new Gun();
            mainGun.Parent = MainWindow;
            MainWindow.Add3DChildren(mainGun);
            mainGun.Visible = false;

            LoadGame();
        }