public override void Update(WorkableEntity caller)
    {
        if (currentWork == null)
        {
            DoWalk();
        }

        if (currentWork.IsDone(caller))
        {
            if (currentWork is MovePointWork)
            {
                DoWait();
            }
            else
            {
                DoWalk();
            }
        }

        currentWork.Update(caller);
    }
예제 #2
0
 public override bool IsDone(WorkableEntity caller)
 {
     return((Vector2)caller.transform.position == targetPosition);
 }
예제 #3
0
 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);
 }
예제 #7
0
 public override bool IsDone(WorkableEntity caller)
 {
     return(false);
 }
예제 #8
0
 public override void Update(WorkableEntity caller)
 {
     caller.SetTargetPosition(Target.transform.position);
 }
예제 #9
0
 public virtual void Update(WorkableEntity caller)
 {
 }
예제 #10
0
 public abstract bool IsDone(WorkableEntity caller);
예제 #11
0
 public override void Update(WorkableEntity caller)
 {
     caller.SetTargetPosition((Vector2)caller.transform.position + direction);
 }