コード例 #1
0
    public void BeginGame()
    {
        currLevelData = GameCtrl._Ins.GetCurrLevelData();
        ui_ScoreTR.gameObject.SetActive(false);
        if (GameCtrl._Ins.CurrPattern == GamePattern.Challenge)
        {
            ui_Title.text = "剩余盘数";

            RefreshTargetItem(currLevelData.Target);
            ui_ShowText.text = currLevelData.Totalnum.ToString();
        }
        else
        {
            ui_Title.text    = "剩余时间";
            ui_ShowText.text = "";


            TransformTimeFormat(GameCtrl._Ins.timer);  // GameCtrl._Ins.timer
            ui_ScoreTR.gameObject.SetActive(true);
            ui_Target1.text = GameCtrl._Ins.scoreGroup[0];
            ui_Target2.text = GameCtrl._Ins.scoreGroup[1];
            ui_Target3.text = GameCtrl._Ins.scoreGroup[2];

            //Debug.Log(timeLevelData);
        }
        foodCtrl.StartGame();
        base.Show();
    }
コード例 #2
0
    public void ResetData()
    {
        capturedWrongCount = 0;
        foodCtrl.ResetAll();
        currLevelData = null;
        targetIDList.Clear();
        foreach (var item in targetItemDic)
        {
            Destroy(item.Value.gameObject);
        }

        targetItemDic.Clear();
    }