Esempio n. 1
0
    private bool CheckCommand_PassMission(DataGuide dataGuide)
    {
        int missionId = (int)dataGuide.A;

        Model_Mission mission = InstancePlayer.instance.model_User.model_level.GetMission(missionId);

        return(mission.starCount > 0);
    }
Esempio n. 2
0
    private bool CheckCommand_BuildingLv(DataGuide dataGuide)
    {
        int buildingId    = (int)dataGuide.A;
        int buildingLevel = (int)dataGuide.B;

        Model_Building building = InstancePlayer.instance.model_User.buildings [(Model_Building.Building_Type)buildingId];

        return(building.level >= buildingLevel);
    }
Esempio n. 3
0
    public Dictionary <int, Guide> guideMap = new Dictionary <int, Guide>();   //id, guide

    public void LoadHeros(string name)
    {
        byte[] bin     = DynamicFileControl.QueryFileContent(name);
        string content = StringHelper.ReadFromBytes(bin);

        LitJson.JSONNode json = LitJson.JSON.Parse(content);

        foreach (LitJson.JSONNode subNode in json.Childs)
        {
            DataGuide data = new DataGuide();
            data.Load(subNode);

            guidesGroup.Add(data);
        }

        CollectGuide();
    }
Esempio n. 4
0
    private bool CheckCommand(DataGuide dataGuide)
    {
        switch (dataGuide.command)
        {
        case "CommanderLv":
            return(CheckCommand_CommanderLv(dataGuide));

        case "BuildingLv":
            return(CheckCommand_BuildingLv(dataGuide));

        case "PassMission":
            return(CheckCommand_PassMission(dataGuide));

        case "GetHero":
            return(CheckCommand_GetHero(dataGuide));

        case "UnitLv":
            return(CheckCommand_UnitLv(dataGuide));
        }

        Assert.assert(false);
        return(false);
    }
Esempio n. 5
0
 private bool CheckCommand_UnitLv(DataGuide dataGuide)
 {
     //TO DO
     return(false);
 }
Esempio n. 6
0
    private bool CheckCommand_GetHero(DataGuide dataGuide)
    {
        int heroId = (int)dataGuide.A;

        return(InstancePlayer.instance.model_User.model_heroGroup.HasHero(heroId));
    }
Esempio n. 7
0
    private bool CheckCommand_CommanderLv(DataGuide dataGuide)
    {
        int level = (int)dataGuide.A;

        return(InstancePlayer.instance.model_User.honorLevel >= level);
    }