Пример #1
0
    public void hideState(UISTATE state)
    {
        switch (state)
        {
        case UISTATE.SPOT:
            bandeau[(int)UISTATE.SPOT].gameObject.SetActive(false);
            labelSprite[(int)UISTATE.SPOT].gameObject.SetActive(false);
            break;

        case UISTATE.CLEAR:
            StopCoroutine("displayEndingScreen");
            bandeau[(int)UISTATE.CLEAR].gameObject.SetActive(false);
            labelSprite[(int)UISTATE.CLEAR].gameObject.SetActive(false);
            panelFinish.gameObject.SetActive(false);
            resetSpriteColor(cache);
            resetLabelColor(levelName);
            resetLabelColor(newTime);
            resetLabelColor(bestTime);
            resetLabelColor(goalTime);
            yellowBandbest.color = new Color(1f, 1f, 1f, 0f);
            yellowBandbest.transform.localScale = new Vector3(2048f, 125f, 1f);
            yellowBandgoal.color = new Color(1f, 1f, 1f, 0f);
            yellowBandgoal.transform.localScale = new Vector3(2048f, 125f, 1f);
            for (int i = 0; i < infoMedal.Count; i++)
            {
                resetLabelColor(infoMedal[i]);
            }
            resetLabelColor(retry);
            resetMedalsPosition();
            timeDisplayed.color = new Color(0.72f, 1f, 1f, 1f);
            break;
        }
    }
Пример #2
0
 public void hideState(UISTATE state)
 {
     switch(state)
     {
     case UISTATE.SPOT:
         bandeau[(int)UISTATE.SPOT].gameObject.SetActive(false);
         labelSprite[(int)UISTATE.SPOT].gameObject.SetActive(false);
         break;
     case UISTATE.CLEAR:
         StopCoroutine("displayEndingScreen");
         bandeau[(int)UISTATE.CLEAR].gameObject.SetActive(false);
         labelSprite[(int)UISTATE.CLEAR].gameObject.SetActive(false);
         panelFinish.gameObject.SetActive(false);
         resetSpriteColor(cache);
         resetLabelColor(levelName);
         resetLabelColor(newTime);
         resetLabelColor(bestTime);
         resetLabelColor(goalTime);
         yellowBandbest.color = new Color(1f, 1f, 1f, 0f);
         yellowBandbest.transform.localScale = new Vector3(2048f, 125f, 1f);
         yellowBandgoal.color = new Color(1f, 1f, 1f, 0f);
         yellowBandgoal.transform.localScale = new Vector3(2048f, 125f, 1f);
         for(int i=0; i<infoMedal.Count; i++)
         {
             resetLabelColor(infoMedal[i]);
         }
         resetLabelColor(retry);
         resetMedalsPosition();
         timeDisplayed.color = new Color(0.72f, 1f, 1f, 1f);
         break;
     }
 }
Пример #3
0
    private void InitServer(int _port)
    {
        networkInit.InitServer(_port);
        currentState = UISTATE.NONE;

        UpdateUI();
    }
Пример #4
0
 public void ChengeUIState(UISTATE nextState)
 {
     if (nextState == UISTATE.ACTIVE && _nowUIState != UISTATE.ACTIVE)
     {
         ActiveInitAction();
     }
     _nowUIState = nextState;
 }
Пример #5
0
 void SetUIState(UISTATE state)
 {
     if (uiState != state)
     {
         ChengeUIStateAction(state);
         uiState = state;
     }
 }
Пример #6
0
    void resetState(UISTATE state)
    {
        bandeau[(int)state].transform.position     = posbandeauBase[(int)state];
        labelSprite[(int)state].transform.position = postagBase[(int)state];
        bandeau[(int)state].transform.localScale   = scalebandeauBase[(int)state];

        bandeau[(int)state].color     = new Color(1f, 1f, 1f, 0f);
        labelSprite[(int)state].color = new Color(1f, 1f, 1f, 0f);
    }
Пример #7
0
 public void TogglePanel(bool _bool)
 {
     if (_bool)
     {
         currentState = UISTATE.CLIENTSERVER;
     }
     else
     {
         currentState = UISTATE.NONE;
     }
     UpdateUI();
 }
Пример #8
0
    public void launchState(UISTATE state)
    {
        switch (state)
        {
        case UISTATE.READY:
            StartCoroutine("launchGetReady");
            break;

        case UISTATE.SPOT:
            StartCoroutine("launchSpotted");
            break;

        case UISTATE.CLEAR:
            StartCoroutine("launchClear");
            break;
        }
    }
Пример #9
0
        public void ChengeUIState(UISTATE nextState)
        {
            if (nextState == UISTATE.ACTIVE && _nowUIState != UISTATE.ACTIVE)
            {
                ActiveInitAction();
            }
            _nowUIState = nextState;

            if (_nowUIState == UISTATE.CLOSE)
            {
                gameObject.SetActive(false);
            }
            else
            {
                gameObject.SetActive(true);
            }
        }
Пример #10
0
    public void LoginRegisterClicked()
    {
        registerState = REGISTERSTATE.NONE;
        GameObject go = EventSystem.current.currentSelectedGameObject;

        if (go != null)
        {
            if (go.name == "Login")
            {
                registerState = REGISTERSTATE.LOGIN;
            }
            else
            {
                registerState = REGISTERSTATE.REGISTER;
            }

            currentState = UISTATE.USERPASSWORD;
            UpdateUI();
        }
    }
 public void OpenMainState()
 {
     _uiSTATE = UISTATE.MAIN_STATE;
     UiGroupSwitcher();
 }
 public void OpenRollState()
 {
     _uiSTATE = UISTATE.ROLL_STATE;
     UiGroupSwitcher();
 }
    //public void SetUIState(UISTATE UiState) => UiGroupSwitcher(UiState);


    public void OpenIntro()
    {
        _uiSTATE = UISTATE.INTRO_STATE;
        UiGroupSwitcher();
    }
 private void Start()
 {
     _uiSTATE = UISTATE.INTRO_STATE;
 }
Пример #15
0
	//0 means demon; 1 means Janitor
	public void GameEnds(int winner){
		currentState = UISTATE.Endgame;
		endPanel.GetComponent<EndPanel_UI> ().Setup (winner);
	}
Пример #16
0
	// Use this for initialization
	void Start () {
		ingame_reset = false;
		currentState = UISTATE.Ingame;
	}
Пример #17
0
 public void launchState(UISTATE state)
 {
     switch(state)
     {
     case UISTATE.READY:
         StartCoroutine("launchGetReady");
         break;
     case UISTATE.SPOT:
         StartCoroutine("launchSpotted");
         break;
     case UISTATE.CLEAR:
         StartCoroutine("launchClear");
         break;
     }
 }
Пример #18
0
 /// <summary>
 /// ui変更時に対応する処理を呼ぶ
 /// </summary>
 /// <param name="state"></param>
 void ChengeUIStateAction(UISTATE state)
 {
     chengeUIStateActionDic[state].Invoke();
 }
Пример #19
0
 public void SetToLogin()
 {
     currentState = UISTATE.LOGINREGISTER;
     UpdateUI();
 }
Пример #20
0
 private void InitClient(string _ip, int _port, string _userName)
 {
     networkInit.InitClient(_ip, _port, _userName);
     currentState = UISTATE.LOGINREGISTER;
     UpdateUI();
 }
Пример #21
0
 protected void AddChengeUIStateAction(UISTATE state, UnityAction ua)
 {
     chengeUIStateActionDic[state].AddListener(ua);
 }
Пример #22
0
    void resetState(UISTATE state)
    {
        bandeau[(int)state].transform.position = posbandeauBase[(int)state];
        labelSprite[(int)state].transform.position = postagBase[(int)state];
        bandeau[(int)state].transform.localScale = scalebandeauBase[(int)state];

        bandeau[(int)state].color = new Color(1f, 1f, 1f, 0f);
        labelSprite[(int)state].color = new Color(1f, 1f, 1f, 0f);
    }