public static WRAction Create_GameOver() { WRAction action = new WRAction(); action.actionType = WRActionType.GameOver; action.gameOver = new WRAction_GameOver(); return(action); }
public static WRAction Create_Skill(C_SyncSkill_0x822 c) { WRAction action = new WRAction(); action.actionType = WRActionType.Skill; action.skill = new WRAction_Skill(c); return(action); }
public static WRAction Create_Prop(List <ProtoFightUnitInfo> unitPropList) { WRAction action = new WRAction(); action.actionType = WRActionType.Prop; action.prop = new WRAction_Prop(unitPropList); return(action); }
public static WRAction Create_TurretAtk(int buildUid, int soliderUid) { WRAction action = new WRAction(); action.actionType = WRActionType.TurretAtk; action.turretAtk = new WRAction_TurretAtk(buildUid, soliderUid); return(action); }
public static WRAction Create_SetProductionSkill(int legionId, int skillUid, float speed) { WRAction action = new WRAction(); action.actionType = WRActionType.SetProductionSkill; action.productionSkill = new WRAction_SetProductionSkill(legionId, skillUid, speed); return(action); }
public static WRAction Create_BuildLegionChange(int uid, int legionId) { WRAction action = new WRAction(); action.actionType = WRActionType.BuildLegionChange; action.buildLegionChange = new WRAction_BuildLegionChange(uid, legionId); return(action); }
public static WRAction Create_HeroBackstage(int heroUid, int targetLegionId) { WRAction action = new WRAction(); action.actionType = WRActionType.HeroBackstage; action.heroBackstage = new WRAction_HeroBackstage(heroUid, targetLegionId); return(action); }
public static WRAction Create_Uplevel(int uid, int level, float time) { WRAction action = new WRAction(); action.actionType = WRActionType.Uplevel; action.uplevel = new WRAction_Uplevel(uid, level, time); return(action); }
public static WRAction Create_SendArm(int fromUid, int toUid, int count, int beginUid) { WRAction action = new WRAction(); action.actionType = WRActionType.SendArm; action.sendArm = new WRAction_SendArm(fromUid, toUid, count, beginUid); return(action); }
public void AddAction(WRAction action) { action.t = War.time; queue.Add(action); if (action.actionType == WRActionType.Skill) { action.t -= 0.5f; if (action.t < 0) { action.t = 0f; } } // Debug.LogFormat ("action.t={0} , War.time={1}", action.t, War.time); }
void CheckAction() { if (War.time > action.t) { action.Exe(); action = null; if (index < count) { action = timeLineData.queue [index]; index++; CheckAction(); } } }
void Init() { Debug.Log("WRTimeLine.Init"); if (!War.isRecord) { this.enabled = false; } else { Debug.Log(" War.timeLineData=" + War.timeLineData); timeLineData = War.timeLineData; count = timeLineData.queue.Count; if (index < count) { action = timeLineData.queue[index]; index++; } } }