public virtual void Frame(ISkillArgs args) { for (int i = 0; i < skills.Count; i++) { ISkill skill = skills[i]; skill.SetDisable(disable); //FreeLog.ActionMark = unit.GetID() + "'s skill " + skill.ToString(); FreeLog.SetTrigger(skill); skill.Frame(args); } if (removes.Count > 0) { for (int i = 0; i < removes.Count; i++) { ISkill skill_1 = removes[i]; skills.Remove(skill_1); } removes.Clear(); } if (adds.Count > 0) { for (int i = 0; i < adds.Count; i++) { ISkill skill_1 = adds[i]; skills.Add(skill_1); } adds.Clear(); } effects.Frame(args); }
public override void DoAction(IEventArgs args) { if (!initialed) { if (prepare != null) { prepare.Act(args); } initialed = true; } FreeLog.SetTrigger(trigger); order.Act(args); if (frame != null) { frame.Act(args); } if (args.FreeContext.AiSuccess) { if (frame is TestCaseMultiAction) { ((TestCaseMultiAction)frame).Record(args); } if (clean != null) { clean.Act(args); } } }
public virtual void Eat(PlayerEntity player, ISkillArgs skill) { foreach (FreeBuf buf in map.Values) { FreeLog.SetTrigger(buf); buf.Eat(player, skill); } }
public virtual void Eat(PlayerEntity player, ISkillArgs skill) { MyDictionary <string, FreeBuf> .Enumerator it = map.GetEnumerator(); while (it.MoveNext()) { FreeBuf buf = it.Current.Value; FreeLog.SetTrigger(buf); buf.Eat(player, skill); } }
private void UpdateFreeMoveEntity(Contexts room, int interval) { FreeMoveEntity[] freeMoves = room.freeMove.GetEntities(); foreach (var freeMoveEntity in freeMoves) { if (freeMoveEntity.freeData.FreeData != null) { FreeLog.SetTrigger(freeMoveEntity.freeData.FreeData); ((FreeEntityData)freeMoveEntity.freeData.FreeData).Frame(args, interval); } } }
public static void Handle(ServerRoom room, DebugCommand message, PlayerEntity player) { if (commandDic.ContainsKey(message.Command.ToLower())) { FreeLog.Reset(); IGameAction action = commandDic[message.Command.ToLower()]; if (FreeLog.IsEnable()) { FreeLog.SetTrigger(string.Format("命令行 {0}: {1}", message.Command, string.Join(" ", message.Args))); } if (commandPara == null) { commandPara = new StringPara("command", ""); } if (message.Args != null) { for (int i = 1; i <= message.Args.Length; i++) { room.FreeArgs.TempUsePara(new StringPara("arg" + i, message.Args[i - 1])); } } room.FreeArgs.TempUsePara(commandPara); room.FreeArgs.TempUse("current", (FreeData)player.freeData.FreeData); action.Act(room.FreeArgs); if (message.Command == "relive") { player.isFlagCompensation = true; } room.FreeArgs.Resume("current"); room.FreeArgs.ResumePara("command"); if (message.Args != null) { for (int i = 1; i <= message.Args.Length; i++) { room.FreeArgs.ResumePara("arg" + i); } } FreeLog.Print(); } }
public virtual void Trigger(IEventArgs args) { if (!disable) { FreeLog.SetTrigger(this); FreeLog.ActionMark = this.@group + " " + this.name + " " + this.key; long s = FreeTimeDebug.RecordStart("trigger " + name); foreach (IGameAction de in actions) { de.Act(args); } FreeTimeDebug.RecordEnd("trigger " + name, s); } }
public override void DoAction(IEventArgs args) { FreeLog.SetTrigger(trigger); order.Act(args); if (frame != null) { frame.Act(args); } if (args.FreeContext.AiSuccess) { if (frame is TestCaseMultiAction) { ((TestCaseMultiAction)frame).Record(args); } } }