示例#1
0
 void Update()
 {
     waitAndDo(setRandomTargetPositionNearby, waitBeforeNextStep, durationWaitBeforeNextStep(),
               !pathInProgress.isMoving());
     transform.position = pathInProgress.changePosition(transform.position, HumanController.speed);
     humanAnimationController.isMoving = pathInProgress.isMoving();
 }
示例#2
0
    private void Update()
    {
        if (state == State.GO_GATHER)
        {
            goGather();
        }
        if (state == State.RETURN_RESOURCE)
        {
            goReturnResource();
        }

        state = determineState();

        transform.position = pathInProgress.changePosition(transform.position, HumanController.speed);
        humanAnimationController.isMoving = pathInProgress.isMoving();
    }
示例#3
0
 void Update()
 {
     transform.position = pathInProgress.changePosition(transform.position, HumanController.speed);
     humanAnimationController.isMoving = pathInProgress.isMoving();
 }