コード例 #1
0
        public override void init(GraphicsDeviceManager graphics)
        {
            base.init(graphics);

            particleManager = new ParticleManager();

            weaponManager = new WeaponManager();
            weaponManager.init(graphics);

            world = new World(new Vector2(0,20));

            levelManager = new LevelManager();
            levelManager.init(graphics);
            //---------------Insert levels here-----------------
            LevelObject level1 = new LevelObject("level1");
            level1.init(graphics);
            level1.addBackGround("backGroundBlue");
            level1.addNewStaticObject("planet", Vector2.Zero);

            levelManager.addNewLevel(level1.LevelName, level1);

            //--------------------------------------------------

            rx7Rocket = new RX7Rocket();
            rx7Rocket.init(graphics);

            camera = new CameraManager(rx7Rocket.Body.Position);
        }
コード例 #2
0
 public void setInitialLevel(LevelObject levelObject)
 {
     currentLevel = levelObject;
 }
コード例 #3
0
 public void addNewLevel(string levelName,LevelObject levelObject)
 {
     if (currentLevel == null)
         currentLevel = levelObject;
     levelList.Add(levelName, levelObject);
 }