public Tick ( IBehaviorHost host, |
||
host | IBehaviorHost | |
time | ||
리턴 | bool |
protected override bool TickCore(RealmTime time) { var chr = Host as Character; var w = RealmManager.GetWorld(Host.Self.Owner.Id); while (doTimes > timesDone) { w.Timers.Add(new WorldTimer(cooldown, (world, t) => { try { timesDone++; } catch { timesDone++; } })); return(behavior.Tick(Host, time)); } return(false); }
protected override bool TickCore(RealmTime time) { bool ret = false; foreach (var i in GetNearestEntitiesByGroup(radius, group)) { ret |= behav.Tick(i, time); } return(ret); }
protected override bool TickCore(RealmTime time) { var d = radius; var x = GetNearestEntity(ref d, objType); if (x != null) { return(behav.Tick(x, time)); } return(false); }
protected override bool TickCore(RealmTime time) { var enemy = Host as Enemy; if (new Random().Next(1, 100) <= percent) { return(result.Tick(Host, time)); } return(false); }
protected override bool TickCore(RealmTime time) { var x = GetNearestEntities(radius, objType); bool ret = false; foreach (var i in x) { ret = true; behav.Tick(i, time); } return(ret); }
protected override void BehaveCore(BehaviorCondition cond, RealmTime?time, object state) { behav.Tick(Host, time.Value); }