public override void Update(WorkableEntity caller) { if (currentWork == null) { DoWalk(); } if (currentWork.IsDone(caller)) { if (currentWork is MovePointWork) { DoWait(); } else { DoWalk(); } } currentWork.Update(caller); }
public override bool IsDone(WorkableEntity caller) { return((Vector2)caller.transform.position == targetPosition); }
public override void Update(WorkableEntity caller) { caller.SetTargetPosition(targetPosition); }
public override void Update(WorkableEntity caller) { currentWaitTime += Time.deltaTime; }
public override bool IsDone(WorkableEntity caller) { return(currentWaitTime >= waitTime); }
public override bool IsDone(WorkableEntity caller) { return(caller.WorkManager.HasWork); }
public override bool IsDone(WorkableEntity caller) { return(false); }
public override void Update(WorkableEntity caller) { caller.SetTargetPosition(Target.transform.position); }
public virtual void Update(WorkableEntity caller) { }
public abstract bool IsDone(WorkableEntity caller);
public override void Update(WorkableEntity caller) { caller.SetTargetPosition((Vector2)caller.transform.position + direction); }