void Update() { waitAndDo(setRandomTargetPositionNearby, waitBeforeNextStep, durationWaitBeforeNextStep(), !pathInProgress.isMoving()); transform.position = pathInProgress.changePosition(transform.position, HumanController.speed); humanAnimationController.isMoving = pathInProgress.isMoving(); }
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(); }
void Update() { transform.position = pathInProgress.changePosition(transform.position, HumanController.speed); humanAnimationController.isMoving = pathInProgress.isMoving(); }