Пример #1
0
    protected override void UseResource(BattleChar user, ICommandData icommand)
    {
        var  command  = icommand.GetCommandData();
        bool isPlayer = user is PlayerChar;

        if (isPlayer)
        {
            var pl  = (PlayerChar)user;
            var bur = new Battle_useResource(command._useResourceType, command._useNum, pl);
            if (!bur.IsUseable())
            {
                return;
            }
            bur.Use();
        }
    }
Пример #2
0
    protected override List <ButtonData> CreateMyButtonData()
    {
        //var useAbleSkillList = BattleController_mono.Instance.GetSkillList();
        var pl = BattleController_mono.Instance.battle._charcterField._playerList[0];
        var useAbleSkillList = pl._PlayerData._mySkillList;
        var resultList       = new List <ButtonData>();

        foreach (var data in useAbleSkillList)
        {
            var btr    = new Battle_useResource(data._Data._useResourceType, data._Data._useNum, pl);
            var btType = (btr.IsUseable()) ? ButtonData.ButtonType.Selectable : ButtonData.ButtonType.Unselectable;
            var add    = new ButtonData(data._Data._skillName, CreateClickEvent(data),
                                        CreateCursorEvent(data),
                                        btType);
            resultList.Add(add);
        }
        return(resultList);
    }