Esempio n. 1
0
    public void InsNewStone()
    {
        if (IsWin)
        {
            StartCoroutine(ShowUI(win));
            _CameraFollow.ResetPosition = true;
            Bird1.SetActive(false);
            Bird2.SetActive(true);
            GoScene2 = true;
            Init();
        }

        else if (_StoneNum > 0)
        {
            _StoneNum -= 1;
            _Stone     = (GameObject)Instantiate(StonePrefab, InsPosition, Quaternion.identity);
            Stone _StoneScript = _Stone.GetComponent <Stone> ();
            _StoneScript.m_GameMain    = this;
            _StoneScript.AudioControl  = AudioControl;
            _StoneScript.LinePoint1    = LinePoint1;
            _StoneScript.LinePoint2    = LinePoint2;
            _StoneScript._CameraFollow = _CameraFollow;
            _StoneScript.Init();
            _CameraFollow.ResetPosition = true;
        }

        else if (_StoneNum == 0)
        {
            StartCoroutine(ShowUI(lose));
            Init();
        }
    }
Esempio n. 2
0
 private void Awake()
 {
     // ScrollSnapRectC.StateIntC = 1;
     if (ScrollSnapRectC.StateIntC == 0)
     {
         Bird.SetActive(true);
     }
     if (ScrollSnapRectC.StateIntC == 1)
     {
         Bird1.SetActive(true);
     }
     if (ScrollSnapRectC.StateIntC == 2)
     {
         Bird2.SetActive(true);
     }
     if (ScrollSnapRect.StateInt == 0)
     {
         ObjSG.SetActive(true);
         ObjMT.SetActive(false);
         ObjHN.SetActive(false);
     }
     if (ScrollSnapRect.StateInt == 1)
     {
         ObjSG.SetActive(false);
         ObjMT.SetActive(true);
         ObjHN.SetActive(false);
     }
     if (ScrollSnapRect.StateInt == 2)
     {
         ObjSG.SetActive(false);
         ObjMT.SetActive(false);
         ObjHN.SetActive(true);
     }
 }