Esempio n. 1
0
 private void OnMouseDown()
 {
     Hint.PlayClip();
     DisableButtons();
     isPause = true;
     MessageSystemGameBlock.SaveSpeed();
     MessageSystemGameBlock.StopGame();
     MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 0;
     Go.SetActive(true);
     gameObject.SetActive(false);
 }
Esempio n. 2
0
 void Start()
 {
     menu         = GameObject.Find("DisableScreen/Menu/Enter");
     question     = GameObject.Find("DisableScreen/Question/Question");
     education[0] = () =>
     {
         if (MessageSystemPlayingScene.IsStart && !PauseGame.IsPause)
         {
             MessageSystemGameBlock.SaveSpeed();
             MessageSystemGameBlock.StopGame();
             MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 0;
         }
         DisableButtons();
         menu.SetActive(false);
         question.SetActive(false);
         PauseGame.SetActivePause(false);
         parentPanel.SetActive(true);
         numberOperation = 1;
     };
     education[1] = () =>
     {
         if (MessageSystemPlayingScene.IsStart && !PauseGame.IsPause)
         {
             MessageSystemGameBlock.StartAfterHit();
             MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 1;
         }
         EnableButtons();
         numberOperation = 0;
         parentPanel.SetActive(false);
         if (!PauseGame.IsPause)
         {
             PauseGame.SetActivePause(true);
         }
         menu.SetActive(true);
         question.SetActive(true);
     };
 }
Esempio n. 3
0
    IEnumerator OpenAfterPlay()
    {
        question.SetActive(false);
        PauseGame.SetActivePause(false);

        if (!PauseGame.IsPause)
        {
            MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 0;
            MessageSystemGameBlock.SaveSpeed();
            MessageSystemGameBlock.StopGame();
        }
        MessageSystemGameBlock.ChangeLayerRight(0);
        menu.SetActive(true);
        Animation anim = menu.GetComponent <Animation>();

        anim["OpenMenuDuringPlay"].time  = 0;
        anim["OpenMenuDuringPlay"].speed = 1;
        anim.Play("OpenMenuDuringPlay");
        yield return(new WaitForSeconds(anim["OpenMenuDuringPlay"].length));

        blockForMenu.SetActive(true);
        numberOperation           = 3;
        CloseMenu.NumberOperation = 1;
    }
Esempio n. 4
0
 public void StopGame()
 {
     MessageSystemGameBlock.SaveSpeed();
     MessageSystemGameBlock.StopGame();
 }
Esempio n. 5
0
 void StopGame()
 {
     MessageSystemGameBlock.SaveSpeed();
     MessageSystemGameBlock.StopGame();
     MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 0;
 }