Пример #1
0
        GameInfoValidator()
        {
            if (s_instance != null)
            {
                throw new Exception("Only one GameInfoValidator is allowed");
            }
            s_instance = this;

            _loadThread = null;
            _loadStatus = LoadStatus.Idle;
        }
Пример #2
0
        public StartupScene(Happiness game) : base(game)
        {
            //LoadStartupDetails();
            m_GIV = GameInfoValidator.Instance;
            m_GIV.BeginLoadFromDisk();

            game.SoundManager.PlayMainMenuMusic();
            game.SoundManager.PlaySound(SoundManager.SEInst.Happiness);

            InputController.IC.OnClick += IC_OnClick;
            InputController.IC.OnKeyUp += IC_OnKeyUp;

            int logoSize = (int)(Constants.Startup_LogoSize * game.ScreenHeight);

            m_LogoRectangle = new Rectangle(0, 0, logoSize, logoSize);

            m_szCreditLine       = "A logic puzzle game by Ron O'Hara";
            m_szMusicCreditLine  = "Muisc by Ronald Jenkees (www.ronaldjenkees.com)";
            m_szArtistCreditLine = "Artwork by: <your name here!> (Artist Wanted)";

            int creditX = (int)(Constants.Startup_CreditX * game.ScreenWidth);
            int creditY = (int)(Constants.Startup_CreditY * game.ScreenHeight);
            int musicY  = (int)(Constants.Startup_MusicCreditY * game.ScreenHeight);

            m_vCreditPosition.X      = creditX;
            m_vCreditPosition.Y      = game.ScreenHeight - creditY;
            m_vMusicCreditPosition.Y = game.ScreenHeight - musicY;
            m_vMusicCreditPosition.X = creditX + 20;

            m_vArtistCreditPosition.X = game.ScreenWidth / 2;
            m_vArtistCreditPosition.Y = game.ScreenHeight - musicY;


            int waitIconSize = (int)(Constants.Startup_WaitIconSize * game.ScreenWidth);

            m_WaitRect       = new Rectangle((Game.ScreenWidth / 2) - (waitIconSize / 2), (Game.ScreenHeight / 2) - (waitIconSize / 2), waitIconSize, waitIconSize);
            m_WaitTextCenter = new Point(Game.ScreenWidth / 2, m_WaitRect.Bottom + 10);
            m_szWaitText     = "Initializing";
        }