Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new FormMineSweeper());

            //Models
            M_jogador = new Jogador();
            M_menu    = new Menu();
            M_mapa    = new Mapa();
            M_Login   = new Login();

            //Views
            V_Menu            = new FormMenu();
            V_Mapa            = new FormMineSweeper();
            V_Instrucoes      = new Instrucoes();
            V_Login           = new FormLogin();
            V_OnOff           = new FormOnOff();
            V_PedirNome       = new PedirNome();
            V_ConsultarPerfil = new FormConsultarPerfil();

            //Controllers
            C_menu  = new ControllerMenu();
            C_mapa  = new ControllerMapa();
            C_Login = new ControllerLogin();

            Application.Run(V_OnOff);
        }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0) && !ControllerMenu.isPaused())                                         //se apertar o botão do mouse, executa:
     {
         GameObject go = Instantiate(m_pfBullet, m_SpawnBullet.transform.position, m_SpawnBullet.rotation); //Cria a bala na cena;
         go.GetComponent <Bullet>().SetPoints(m_PointA, m_PointB);                                          //Passa para a bala os ponto A e B;
     }
 }
        private static int GetInputForCarAttribute(string outputForNextCarAttribute)
        {
            int    userInput;
            string output = outputForNextCarAttribute;

            Console.WriteLine(output);
            Console.Write("Deine Eingabe: ");

            userInput = ControllerMenu.GetStringToInt();

            return(userInput);
        }
Exemplo n.º 4
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        video            = TejoVideo.GetComponent <VideoPlayer>();
        playingVideoText = PlayVideoText.GetComponent <Text>();
        audio_juke       = jukebox.GetComponent <AudioSource>();
    }
        private static int GetInputForCarAttribute(Enum @enum, string outputForNextCarAttribute)
        {
            int    userInput;
            string output = outputForNextCarAttribute;

            output += GetEnumItemsToString(@enum);

            Console.WriteLine(output);
            Console.Write("Deine Eingabe: ");

            userInput = ControllerMenu.GetStringToInt();
            userInput = GetAbove0OrBelowLengthOfEnum(userInput, @enum);
            Console.WriteLine("Du hast " + userInput + " gewählt\n");
            return(userInput);
        }
Exemplo n.º 6
0
    private void ToggleMenu(ControllerMenu menu)
    {
        if (_activeMenu == menu)
        {
            return;
        }

        if (_activeMenu != null)
        {
            _activeMenu.gameObject.SetActive(false);
        }

        menu.gameObject.SetActive(true);
        _activeMenu = menu;
    }
    public void Awake()
    {
        if (menu == null)
        {
            menu = this;
            DontDestroyOnLoad(menu);
        }
        else if (this != menu)
        {
            Destroy(this);
        }

        //canvasPause.gameObject.SetActive( false );
        //canvasGameOver.gameObject.SetActive( false );
        //canvasMenu.gameObject.SetActive( true );
    }
    public void displayToggle()
    {
        if (isControllerMenu == true)
        {
            AudioMenu.SetActive(true);

            ControllerMenu.SetActive(false);

            AudioControlsSwitch.GetComponent <Text>().text = "" + "Controls";
            isControllerMenu = false;
        }
        else
        {
            AudioMenu.SetActive(false);

            ControllerMenu.SetActive(true);

            AudioControlsSwitch.GetComponent <Text>().text = "" + "Audio";
            isControllerMenu = true;
        }
    }
Exemplo n.º 9
0
    void Start()
    {
        DontDestroyOnLoad(gameObject);            // Команда Unity для сохранения объекта между сценами.

        publisher    = new Publisher();
        saveManager  = new SaveManager();
        gameManager  = new GameManager();
        animaManager = new AnimaManager();
        //logicManager = new LogicManager();
        //loadManager = new LoadManager(_logicManager);

        var            menuObject     = GameObject.FindWithTag("SceneController");
        ControllerMenu controllerMenu = menuObject.GetComponent <ControllerMenu>();

        if (controllerMenu == null)
        {
            throw new UnityException("There is no ControllerMenu script on UI object");
        }

        var buttonObject = GameObject.Find("btnStart");
        MouseClickHandler clickHandler = buttonObject.GetComponent <MouseClickHandler>();

        if (clickHandler == null)
        {
            throw new UnityException("There is no MouseClickHandler script on UI object");
        }

        UiButtonsMenu uiButtonsMenu = buttonObject.GetComponent <UiButtonsMenu>();

        if (clickHandler == null)
        {
            throw new UnityException("There is no MouseClickHandler script on UI object");
        }

        // Set dependencies
        clickHandler.SetDependecies(animaManager);
        uiButtonsMenu.SetDependecies(saveManager, animaManager);
        controllerMenu.SetDependecies(saveManager);
        publisher.AddSubscriber(saveManager);
    }
Exemplo n.º 10
0
 public VueMenu(ControllerMenu controllerMenu)
 {
     _controllerMenu = controllerMenu;
 }
Exemplo n.º 11
0
 private void Awake()
 {
     instance = this;
 }
Exemplo n.º 12
0
 static void Main(string[] args)
 {
     ControllerMenu.MenuInput();
 }
Exemplo n.º 13
0
 void InitialisationController()
 {
     _controllerMenu        = new ControllerMenu(_daoUtilisateur);
     _controllerUtilisateur = new ControllerUtilisateur(_daoUtilisateur, _controllerMenu);
     this.connection        = new MySqlConnection(connectionString);
 }