Esempio n. 1
0
        public ScreenPool(Minijam32 game)
        {
            this.screenState         = ScreenState.Start;
            this.backgroundDirtColor = new Color(104, 76, 60);

            currentNewLevelDelayLeft = 0f;

            newLevelDrawer     = new NewLevelDrawer(game);
            finishedGameDrawer = new GameFinishedDrawer(game);
            menuGui            = new MenuGui(game);
        }
    public void CreateProfile()
    {
        //get name input text
        GameObject oName     = GameObject.Find("name_InputField");
        GameObject oAge      = GameObject.Find("age_InputField");
        GameObject userPanel = GameObject.Find("userPanel");
        GameObject testPanel = GameObject.Find("testPanel");

        if (menuGUI == null)
        {
            menuGUI = GetComponent <MenuGui>();
        }

        bool formOK = true;

        if (name == "")
        {
            //set color to red
            menuGUI.markRedUi(oName);
            formOK = false;
        }

        if (age < 0 || age > 100)
        {
            menuGUI.markRedUi(oAge);
            formOK = false;
        }
        //check if form is valid
        if (formOK != true)
        {
            menuGUI.markYellowUi(userPanel);
            return;
        }
        else
        {
            //userPanel.SetActive(false);
            menuGUI.markGreenUi(userPanel);
            menuGUI.markYellowUi(testPanel);
            oName.GetComponent <InputField>().DeactivateInputField();
        }


        _Profile = new Person();

        _Profile.name   = name;
        _Profile.age    = age;
        _Profile.gender = gender;

        _profileExist = true;
    }
    void Awake()
    {
        if (_profileExist == false)         //singleton initsialization
        {
            _profileExist = true;

            _Profile = new Person();
            DontDestroyOnLoad(this.gameObject);

            menuGUI    = GetComponent <MenuGui>();
            testSchema = GetComponent <TestSchema>();
            //tell gui to modify this test scheme
        }
    }
Esempio n. 4
0
    //testscheme is allready done(bindTestschemaToGUI), only gui remains to be greenlit!
    public void testValidCheck()
    {
        bool doReturn = false;

        //reload selections, in case missed selections(bad programflow, where toggle selection is not updated).

        MenuGui gui = GetComponent <MenuGui>();

        gui.setHitTargets90();
        gui.setHitTargets360();
        gui.setFollowTargets();
        gui.setEyeTrack();
        gui.setMouse();
        gui.setEyeMouse();

        if (_testsTypes["hitTargets90"] == false && _testsTypes["hitTargets360"] == false && _testsTypes["followTargets"] == false)
        {
            if (gui != null)
            {
                gui.badTestSelection();
            }
            testValidation = false;
            doReturn       = true;
        }

        //check if all controls are missing(should not)
        if (_testsTypes["eyeMouse"] == false && _testsTypes["mouse"] == false && _testsTypes["eyeTrack"] == false)
        {
            if (gui != null)
            {
                gui.badControlsSelection();
            }
            testValidation = false;
            doReturn       = true;
        }

        if (doReturn)
        {
            return;
        }

        testValidation = true;

        //restore colors
        MenuGui guiHandler = GetComponent <MenuGui>();

        guiHandler.setupTestDone();
    }
Esempio n. 5
0
        public override void Load()
        {
            base.Load();

            if (Content == null)
            {
                Content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            GameContent.Load(Content);

            menu      = MenuGui.Instance;
            sheetList = SpritesheetListGui.Instance;
            selector  = SelectorGui.Instance;
            frames    = FramesGui.Instance;
            prev      = PreviewGui.Instance;
            animList  = AnimationsListGui.Instance;
        }
Esempio n. 6
0
    void Awake()
    {
        antallPenger = startpenger;
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        runde          = 0;
        nedteller      = 40f;
        resetNedteller = 40f;

        fasebyttegraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics>();
        kampfase          = GetComponent <Kampfase> ();
        menuGui           = GetComponent <MenuGui> ();
        faseGUI           = GetComponent <FaseGUI> ();
    }
Esempio n. 7
0
    void Awake()
    {
        if (!_isActive)
        {
            DontDestroyOnLoad(this.gameObject);
            _isActive = true;

            //init
            Steering = SteeringControls.instance();
            //Trackcapture  = sceneTrackdata.instance();
            //SceneChanger  = GetComponent<changeScene>();
            //unsign monobehaviors for more easy to bind gui events
            userProfile  = GetComponent <ProfileManager>();
            testSchema   = GetComponent <TestSchema>();
            menuUI       = GetComponent <MenuGui>();
            screensize   = new Rect();
            screensize.x = Screen.width;
            screensize.y = Screen.height;
        }
        else
        {
            Destroy(this.gameObject);
        }
    }
Esempio n. 8
0
        public void MenuChinh()
        {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.SetCursorPosition(38, 08); Console.WriteLine(" █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█");
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Console.SetCursorPosition(38, 09); Console.WriteLine(" █                                           █");
            Console.ForegroundColor = ConsoleColor.Magenta;
            Console.SetCursorPosition(38, 10); Console.WriteLine(" █   ❶ 1.NHẬP DANH SÁCH HỌC SINH             █");
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.SetCursorPosition(38, 11); Console.WriteLine(" █   ❷ 2.NHẬP DANH SÁCH GIÁO VIÊN            █");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.SetCursorPosition(38, 12); Console.WriteLine(" █   ❸ 3.KẾT THÚC                            █");
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.SetCursorPosition(38, 13); Console.WriteLine(" █                                           █");
            Console.ForegroundColor = ConsoleColor.White;
            Console.SetCursorPosition(38, 14); Console.WriteLine("●▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀● ");
            MenuGui mng = new MenuGui();
            int     i   = int.Parse(Console.ReadLine());

            switch (i)
            {
            case 1:
                Console.Clear();
                mng.THhs();
                break;

            case 2:
                Console.Clear();
                mng.THgv();
                break;

            case 3:
                Environment.Exit(0);
                break;
            }
        }
 void Awake()
 {
     menugui    = GameObject.Find("ScriptHolder").GetComponent <MenuGui> ();
     fasegui    = GameObject.Find("ScriptHolder").GetComponent <FaseGUI> ();
     isGameOver = false;
 }
Esempio n. 10
0
 void Awake()
 {
     //gameManager = GameObject.Find ("ScriptHolder").GetComponent<GameManager> ();
     menuGui = GameObject.Find("ScriptHolder").GetComponent <MenuGui> ();
 }
 void Awake()
 {
     //Fyller skripvariablene med tilhørende skripts
     gameManager = gameObject.GetComponentInParent <GameManager> ();
     guimenu     = gameObject.GetComponentInParent <MenuGui> ();
 }