コード例 #1
0
        /// <summary>
        /// constructor
        /// </summary>
        public cPortalManager()
        {
            // Singleton class
            _instance = this;

            // Setup the basic
            _portals = new cPortal[2];
            _portals[0] = new cPortal();
            _portals[1] = new cPortal();
            _portals[0].PortalColor = new Color(230, 30, 30, 255);
            _portals[1].PortalColor = new Color(30, 230, 30, 255);
        }
コード例 #2
0
ファイル: cEngine.cs プロジェクト: mikecann/Portal2D-XNA
        public void loadLevel(String levelName)
        {
            // Very quick and dirty way of removing all objects!
            _scene = new cScene();
            _physics = new cPhysics();
            _player = new cPlayer();
            _particleEngine = new cParticleEngine();
            _effectManager = cEffectManager.Instance;
            _lightMapManager = new cLightMapManager();
            _portalManager = new cPortalManager();

            _gameTimer = 0;
            _scene.loadLevel(levelName);
            _scene.initLevel();
            cCamera.Instance.FocusObject = _player;
            _player.LivesRemain = 3;
            _gameState = GAME_STATE.INTRO;
        }