コード例 #1
0
 public override void InitState(SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig, double fixTime)
 {
     int index = self.GetSkillStateIndex(skillInfo);
     var time = self.GetSkillStateTime(skillConfig, index);
     self.SetSkillStateTime(skillInfo, time + fixTime);
     self.LogInfo("State [{0}] NowTime bEGIN:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetNowTime()));
 }
コード例 #2
0
        public override void InitState(SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig, double fixTime)
        {
            int index = self.GetSkillStateIndex(skillInfo);
            var time  = self.GetSkillStateTime(skillConfig, index);

            self.SetSkillStateTime(skillInfo, time + fixTime);
            self.LogInfo("State [{0}] NowTime bEGIN:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetNowTime()));
        }
コード例 #3
0
        public static SkillLogicState GetSkillLogicState(SkillInfo_New skillInfo, SkillObj logObj)
        {
            string          stateName = logObj.GetSkillLogicStateName(skillInfo);
            SkillLogicState state     = GetSkillLogicState(stateName);

            if (state == null && logObj != null)
            {
                logObj.LogInfo("SkillLogicStates not found stateName[{0}]".F(stateName));
            }
            return(state);
        }
コード例 #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;
     }
     self.SetSkillStateTime(skillInfo, self.GetSkillStateTime(skillInfo) - self.GetDeltaTime());
     //self.LogInfo("State [{0}] Time:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetSkillStateTime(skillInfo)));
     if (self.GetSkillStateTime(skillInfo) <= 0)
     {
         self.LogInfo("State [{0}] NowTime fINISH:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetNowTime()));
         ret = LogicStateTickRet.NextState;
         self.LogInfo("ChargeState:skillObj[{0}] skill:[{1}] Charge Finish".F(self.GetID(), self.GetSkillID(skillInfo)));
     }
     return ret;
 }
コード例 #5
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);
            }
            self.SetSkillStateTime(skillInfo, self.GetSkillStateTime(skillInfo) - self.GetDeltaTime());
            //self.LogInfo("State [{0}] Time:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetSkillStateTime(skillInfo)));
            if (self.GetSkillStateTime(skillInfo) <= 0)
            {
                self.LogInfo("State [{0}] NowTime fINISH:[{1}]".F(self.GetSkillLogicStateName(skillInfo), self.GetNowTime()));
                ret = LogicStateTickRet.NextState;
                self.LogInfo("ChargeState:skillObj[{0}] skill:[{1}] Charge Finish".F(self.GetID(), self.GetSkillID(skillInfo)));
            }
            return(ret);
        }
コード例 #6
0
 public override double OnStateChanged(string tarState, SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
 {
     self.LogInfo("State [{0}] finish".F(self.GetSkillLogicStateName(skillInfo)));
     return(self.GetSkillStateTime(skillInfo));
 }
コード例 #7
0
ファイル: BattleModule.cs プロジェクト: hzy125060691/apple
 public static SkillLogicState GetSkillLogicState(SkillInfo_New skillInfo, SkillObj logObj)
 {
     string stateName = logObj.GetSkillLogicStateName(skillInfo);
     SkillLogicState state = GetSkillLogicState(stateName);
     if (state == null && logObj != null)
     {
         logObj.LogInfo("SkillLogicStates not found stateName[{0}]".F(stateName));
     }
     return state;
 }
コード例 #8
0
 public override double OnStateChanged(string tarState, SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig)
 {
     self.LogInfo("State [{0}] finish".F(self.GetSkillLogicStateName(skillInfo)));
     return self.GetSkillStateTime(skillInfo);
 }