Exemple #1
0
        //@benbaird initializes the console, the pause overlay, and the soundbar
        private void initConsole()
        {
            //initialize the debug console
            _console = new FlxConsole(targetLeft, targetWidth);

            _console.log(FlxG.LIBRARY_NAME +
                         " v" + FlxG.LIBRARY_MAJOR_VERSION.ToString() + "." + FlxG.LIBRARY_MINOR_VERSION.ToString());
            _console.log("---------------------------------------");

            //Pause screen popup
            _pausePanel = new FlxPause();
            if (_helpStrings != null)
            {
                _pausePanel.helpX      = _helpStrings[0];
                _pausePanel.helpC      = _helpStrings[1];
                _pausePanel.helpMouse  = _helpStrings[2];
                _pausePanel.helpArrows = _helpStrings[3];
            }

            //Sound Tray popup
            _soundTrayRect    = new Rectangle((FlxG.width - 80) / 2, -30, 80, 30);
            _soundTrayVisible = false;

            _soundCaption = new FlxText((FlxG.width - 80) / 2, -10, 80, "VOLUME");
            _soundCaption.setFormat(null, 1, Color.White, FlxJustification.Center, Color.White).height = 10;

            int bx = 10;
            int by = 14;

            _soundTrayBars = new FlxSprite[10];
            for (int i = 0; i < 10; i++)
            {
                _soundTrayBars[i]              = new FlxSprite(_soundTrayRect.X + (bx * 1), -i, null);
                _soundTrayBars[i].width        = 4;
                _soundTrayBars[i].height       = i + 1;
                _soundTrayBars[i].scrollFactor = Vector2.Zero;
                bx += 6;
                by--;
            }
        }
Exemple #2
0
        //@benbaird initializes the console, the pause overlay, and the soundbar
        private void initConsole()
        {
            //initialize the debug console
            _console = new FlxConsole(targetLeft, targetWidth);

            _console.log(FlxG.LIBRARY_NAME +
                " v" + FlxG.LIBRARY_MAJOR_VERSION.ToString() + "." + FlxG.LIBRARY_MINOR_VERSION.ToString());
            _console.log("---------------------------------------");

            //Pause screen popup
            _pausePanel = new FlxPause();
            if (_helpStrings != null)
            {
                _pausePanel.helpX = _helpStrings[0];
                _pausePanel.helpC = _helpStrings[1];
                _pausePanel.helpMouse = _helpStrings[2];
                _pausePanel.helpArrows = _helpStrings[3];
            }

            //Sound Tray popup
            _soundTrayRect = new Rectangle((FlxG.width - 80) / 2, -30, 80, 30);
            _soundTrayVisible = false;

            _soundCaption = new FlxText((FlxG.width - 80) / 2, -10, 80, "VOLUME");
            _soundCaption.setFormat(null, 1, Color.White, FlxJustification.Center, Color.White).height = 10;

            int bx = 10;
            int by = 14;
            _soundTrayBars = new FlxSprite[10];
            for(int i = 0; i < 10; i++)
            {
                _soundTrayBars[i] = new FlxSprite(_soundTrayRect.X + (bx * 1), -i, null);
                _soundTrayBars[i].width = 4;
                _soundTrayBars[i].height = i + 1;
                _soundTrayBars[i].scrollFactor = Vector2.Zero;
                bx += 6;
                by--;
            }
        }
Exemple #3
0
        /// <summary>
        /// @benbaird initializes the console, the pause overlay, and the soundbar
        /// </summary>
        private void initConsole()
        {
            hud = new FlxHud(targetLeft, targetWidth);


            //initialize the debug console
            _console = new FlxConsole(targetLeft, targetWidth);

            _console.log(FlxG.LIBRARY_NAME +
                         " v" + FlxG.LIBRARY_MAJOR_VERSION.ToString() + "." + FlxG.LIBRARY_MINOR_VERSION.ToString());

            // Display some information about the engine we are using.
            Console.WriteLine("\nFlxFactory initialization\nFlixel Details LIBRARY:{0} -- v{1}.{2}", FlxG.LIBRARY_NAME, FlxG.LIBRARY_MAJOR_VERSION, FlxG.LIBRARY_MINOR_VERSION);


            /*
             * Assembly assembly = Assembly.GetExecutingAssembly();
             * FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
             * string version = fileVersionInfo.ProductVersion;
             * string gameName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
             * Console.WriteLine(gameName + " - Build version: " + version);
             *
             * _console.log(gameName + " - Build version: " + version);
             */


            _console.log("---------------------------------------");



            //Pause screen popup
            _pausePanel = new FlxPause();
            if (_helpStrings != null)
            {
                _pausePanel.helpX      = _helpStrings[0];
                _pausePanel.helpC      = _helpStrings[1];
                _pausePanel.helpMouse  = _helpStrings[2];
                _pausePanel.helpArrows = _helpStrings[3];
            }

            //Sound Tray popup
            _soundTrayRect    = new Rectangle((FlxG.width - 80) / 2, -30, 80, 30);
            _soundTrayVisible = false;

            _soundCaption = new FlxText((FlxG.width - 80) / 2, -10, 80, "VOLUME [=Lower ]=Higher \\=Mute or Unmute");
            _soundCaption.setFormat(null, 1, Color.White, FlxJustification.Center, Color.White).height = 10;

            int bx = 10;
            int by = 14;

            _soundTrayBars = new FlxSprite[10];
            for (int i = 0; i < 10; i++)
            {
                _soundTrayBars[i]              = new FlxSprite(_soundTrayRect.X + (bx * 1), -i, null);
                _soundTrayBars[i].width        = 4;
                _soundTrayBars[i].height       = i + 1;
                _soundTrayBars[i].scrollFactor = Vector2.Zero;
                bx += 6;
                by--;
            }
        }