Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        GameInfo = GameObject.Find("GameInfo");
        if (GameInfo == null)
        {
            GameInfo = new GameObject("GameInfo");
            GameInfo.AddComponent <GameInfo>();

            Invoke("Start", 0.1f);
            return;
        }
        Cheat_UI.GetComponent <Toggle> ().isOn = GameInfo.GetComponent <GameInfo> ().Cheat;

        int StageNum = GameInfo.GetComponent <GameInfo> ().StageNum;

        for (int i = 0; i < StageNum; i++)
        {
            Stage [i].GetComponent <Stage> ().StageLevel = i + 1;
            Stage [i].GetComponent <Stage> ().Init();
        }


        StageParent.SetActive(true);
        ViewCard.SetActive(true);
        ChooseSkill.SetActive(true);
        Cheat_UI.SetActive(true);

        ReadyToPlay.transform.parent.gameObject.SetActive(false);
        Close.SetActive(false);
        ReadyToUpGrade.SetActive(false);
    }
Esempio n. 2
0
 public void OnClickCheat()
 {
     GameInfo.GetComponent <GameInfo> ().Cheat = Cheat_UI.GetComponent <Toggle> ().isOn;
 }