Beispiel #1
0
        public override bool IsActionLimited(SkillObj self, ActionLimitType limit, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
        {
            int iLimit = -1;

            switch (limit)
            {
            case ActionLimitType.Attack:
                iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionAttackLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
                break;

            case ActionLimitType.Move:
                iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionMoveLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
                break;

            case ActionLimitType.UseSkill:
                iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionUseSkillLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
                break;

            default:
                System.Diagnostics.Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
                break;
            }
            if (iLimit == 1)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 public override bool IsActionLimited(SkillObj self, ActionLimitType limit, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
 {
     int iLimit = -1;
     switch (limit)
     {
         case ActionLimitType.Attack:
             iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionAttackLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
             break;
         case ActionLimitType.Move:
             iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionMoveLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
             break;
         case ActionLimitType.UseSkill:
             iLimit = self.GetSkillStateIntParam(skillConfig, key_ActionUseSkillLimit_SkillConfig, self.GetSkillStateIndex(skillInfo));
             break;
         default:
             System.Diagnostics.Debug.Assert(false, "limit == default IsActionLimited:[{0}]".F(limit));
             break;
     }
     if (iLimit == 1)
     {
         return true;
     }
     return false;
 }
 public override LogicStateTickRet Tick(SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
 {
     LogicStateTickRet ret = base.Tick(self, skillInfo, skillConfig);
     if (ret == LogicStateTickRet.TimeFinish)
     {
         return ret;
     }
     if(self.GetSkillStateIntParam(skillInfo, key) == NotEffect)
     {
         self.SetSkillStateIntParam(skillInfo, key, Effected);
         return LogicStateTickRet.OnEffect;
     }
     else
     {
         return LogicStateTickRet.NextState;
     }
     return ret;
 }
Beispiel #4
0
        public override LogicStateTickRet Tick(SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
        {
            LogicStateTickRet ret = base.Tick(self, skillInfo, skillConfig);

            if (ret == LogicStateTickRet.TimeFinish)
            {
                return(ret);
            }
            if (self.GetSkillStateIntParam(skillInfo, key) == NotEffect)
            {
                self.SetSkillStateIntParam(skillInfo, key, Effected);
                return(LogicStateTickRet.OnEffect);
            }
            else
            {
                return(LogicStateTickRet.NextState);
            }
            return(ret);
        }