Esempio n. 1
0
    private void WaitBuildMeatFarm()
    {
        List <ScriptCommandParams.BuildFacilityInfo> farmBuildFacilityInfo = this.tutorialStatus.farmBuildFacilityInfo;

        for (int i = 0; i < farmBuildFacilityInfo.Count; i++)
        {
            if (farmBuildFacilityInfo[i].id == 1)
            {
                ScriptCommandParams.BuildFacilityInfo value = farmBuildFacilityInfo[i];
                value.buildTime          = 0;
                farmBuildFacilityInfo[i] = value;
            }
        }
    }
Esempio n. 2
0
    private void WaitFarmBuild()
    {
        ScriptCommandParams.BuildFacilityInfo        buildFacilityInfo     = this.scriptEngine.GetBuildFacilityInfo();
        List <ScriptCommandParams.BuildFacilityInfo> farmBuildFacilityInfo = this.tutorialStatus.farmBuildFacilityInfo;

        for (int i = 0; i < farmBuildFacilityInfo.Count; i++)
        {
            if (farmBuildFacilityInfo[i].id == buildFacilityInfo.id && farmBuildFacilityInfo[i].posGridX == buildFacilityInfo.posGridX && farmBuildFacilityInfo[i].posGridY == buildFacilityInfo.posGridY)
            {
                this.tutorialStatus.farmBuildFacilityInfo.RemoveAt(i);
                break;
            }
        }
        this.tutorialStatus.farmBuildFacilityInfo.Add(buildFacilityInfo);
    }
Esempio n. 3
0
    private void WaitFarmBuild()
    {
        ScriptCommandParams.BuildFacilityInfo buildFacilityInfo = this.scriptEngine.GetBuildFacilityInfo();
        int id       = buildFacilityInfo.id;
        int posGridX = buildFacilityInfo.posGridX;
        int posGridY = buildFacilityInfo.posGridY;
        int time     = buildFacilityInfo.buildTime;

        if (!buildFacilityInfo.buildComplete)
        {
            IEnumerator routine = this.controlToGame.BuildFacility(id, posGridX, posGridY, false, delegate(int userFacilityID)
            {
                this.controlToGame.SetFacilityBuildDummyTime(userFacilityID, time);
                this.ResumeScript();
            });
            AppCoroutine.Start(routine, false);
        }
        else
        {
            this.controlToGame.FacilityBuildComplete(id);
            base.ResumeScript();
        }
    }
Esempio n. 4
0
 private void WaitBuildCompleteTap()
 {
     ScriptCommandParams.BuildFacilityInfo buildFacilityInfo = this.scriptEngine.GetBuildFacilityInfo();
     this.tutorialStatus.farmBuildCompleteList.Add(buildFacilityInfo.id);
 }
Esempio n. 5
0
    public IEnumerator CreateRestartScreen(int sceneType, List <ScriptCommandParams.BuildFacilityInfo> buildFacilityInfoList, int meatNum, int digiStoneNum, int linkPointNum, List <ScriptCommandParams.DigimonExpInfo> digimonExpInfo, List <string> openUI, List <string> openConfirmUI, List <string> selectUI, TutorialControlToGame controlToGame)
    {
        if (sceneType != -1)
        {
            bool isFinished = false;
            controlToGame.ChangeScene(sceneType, delegate
            {
                isFinished = true;
            }, true, null);
            while (!isFinished)
            {
                yield return(null);
            }
        }
        for (int i = 0; i < buildFacilityInfoList.Count; i++)
        {
            ScriptCommandParams.BuildFacilityInfo info = buildFacilityInfoList[i];
            if (!info.buildComplete)
            {
                yield return(AppCoroutine.Start(controlToGame.BuildFacility(info.id, info.posGridX, info.posGridY, false, delegate(int userFacilityID)
                {
                    controlToGame.SetFacilityBuildDummyTime(userFacilityID, info.buildTime);
                }), false));
            }
            else
            {
                controlToGame.FacilityBuildComplete(info.id);
            }
        }
        controlToGame.SetPlayerMeatCount(meatNum);
        controlToGame.SetPlayerDigiStoneCount(digiStoneNum);
        controlToGame.SetPlayerLinkPointCount(linkPointNum);
        for (int k = 0; k < digimonExpInfo.Count; k++)
        {
            ScriptCommandParams.DigimonExpInfo digimonExpInfo2 = digimonExpInfo[k];
            controlToGame.SetDigimonExp(digimonExpInfo2.index, digimonExpInfo2.level, digimonExpInfo2.exp);
        }
        bool   show;
        Action onOpendAction = delegate()
        {
            show = true;
        };

        for (int j = 0; j < openUI.Count; j++)
        {
            show = false;
            controlToGame.OpenCommonDialog(openUI[j], onOpendAction);
            while (!show)
            {
                yield return(null);
            }
            string text = openUI[j];
            if (text != null)
            {
                if (text == "CMD_MealExecution")
                {
                    controlToGame.SetMealUI_NotServerRequest();
                }
            }
        }
        if (openConfirmUI.Any((string x) => x == "GASHA_START"))
        {
            show = false;
            controlToGame.OpenConfirmDialog("GashaConfirmDialog", onOpendAction);
            while (!show)
            {
                yield return(null);
            }
        }
        for (int l = 0; l < selectUI.Count; l++)
        {
            controlToGame.SetInduceUI(selectUI[l], true, 0, this.tutorialUI, null);
        }
        yield break;
    }
Esempio n. 6
0
 private void WaitBuildCompleteTap()
 {
     ScriptCommandParams.BuildFacilityInfo buildFacilityInfo = this.scriptEngine.GetBuildFacilityInfo();
     this.tutorialUI.MaskBlack.gameObject.SetActive(false);
     this.controlToGame.WaitBuildCompleteTap(new Action(this.OnTouchFacilityBuild), new Action(base.ResumeScript), buildFacilityInfo.id);
 }