Exemplo n.º 1
0
        public void ResetState()
        {
            GameWeaponController.gun1Name  = Profile.Gun1Name;
            GameWeaponController.gun2Name  = Profile.Gun2Name;
            GameWeaponController.item1Name = Profile.Item1Name;
            GameWeaponController.item2Name = Profile.Item2Name;

            stgConfig = StgDataPointResource.INSTANCE.GetStgDataConfig(selectedPoint);
            int total = StgDataPointResource.INSTANCE.stgConfigList.Count;

            if (MenuMissionInfo.selectedPoint <= 0)
            {
                this.leftArrowButton.SetActive(false);
            }
            else
            {
                this.leftArrowButton.SetActive(true);
            }

            if (MenuMissionInfo.selectedPoint >= (total - 1))
            {
                this.rightArrowButton.SetActive(false);
            }
            else
            {
                this.rightArrowButton.SetActive(true);
            }

            this.missionIndexText.text = (MenuMissionInfo.selectedPoint + 1) + "/" + total;
            this.missionInfoText.text  = this.stgConfig.description;
            this.diffStars.SetStars(this.stgConfig.hardness);
            this.rewardText.text = this.stgConfig.baseReward.ToString();
        }
Exemplo n.º 2
0
    public void Clone(StgDataConfigure clone)
    {
        this.configureName = clone.configureName;

        this.title          = clone.title;
        this.description    = clone.title;
        this.descriptionkey = clone.descriptionkey;
        this.baseReward     = clone.baseReward;
        this.hardness       = clone.hardness;
    }
Exemplo n.º 3
0
    static void BuildJson()
    {
        StgDataConfigure stgConfig1 = new StgDataConfigure()
        {
            configureName  = "Town_00_00",
            title          = "Mission 1",
            description    = "You wake up in the hospital to the sound of moaning. Zombies are all around, protect yourself.",
            descriptionkey = "11000",
            baseReward     = 300,
            hardness       = 1
        };
        StgDataConfigure stgConfig2 = new StgDataConfigure()
        {
            configureName  = "Town_00_01",
            title          = "Mission 2",
            description    = "The zombies just keep coming, you have to get out of here.",
            descriptionkey = "11001",
            baseReward     = 500,
            hardness       = 3
        };
        StgDataConfigure stgConfig3 = new StgDataConfigure()
        {
            configureName  = "Town_00_02",
            title          = "Mission 3",
            description    = "You found a survivor, protect her.",
            descriptionkey = "11002",
            baseReward     = 800,
            hardness       = 5
        };
        List <StgDataConfigure> configs = new List <StgDataConfigure>();

        configs.Add(stgConfig1);
        configs.Add(stgConfig2);
        configs.Add(stgConfig3);
        string str = JsonMapper.ToJson(configs);

        File.WriteAllText(Application.dataPath + "/" + "Resources/GameData/StageData/DATA_POINT.txt", str);
    }