Example #1
0
        public cScene()
        {
            _instance = this;
            _sceneObjects = new List<cGameObject>();
            _shaderObjects = new List<iShaderObject>();
            _bitmapFont = cFontManager.Instance.getFont("Treb11");
            cSpriteManager.Instance.addTexture(@"Resources/HUD/descripwindow", "descripwindow");
            _blankWindow = new cSprite("descripwindow");
            _blankWindow.ScreenFixed = true;
            cSpriteManager.Instance.addTexture("Resources/Menu/half-life2_pointer", "mouse_pointer");
            _mousePointer = new cSprite("mouse_pointer");
            _mousePointer.ScreenFixed = true;
            cSpriteManager.Instance.addTexture("Resources/Menu/button1", "button1");
            _startButton = new cMenuTextButton("button1", "Start");
            _startButton.setHoverOverColor(new Color(17, 194, 253));
            _startButton.setOnClickListener(this);
            _startButton.ScreenFixed = true;

            _continueButton = new cMenuTextButton("button1", "Continue");
            _continueButton.setHoverOverColor(new Color(17, 194, 253));
            _continueButton.setOnClickListener(this);
            _continueButton.ScreenFixed = true;
        }
Example #2
0
        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;
        }