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())); }
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); }
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; }
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); }
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)); }
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; }
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); }