public GameStateMachine.UpdateStates UpdateEntity() { ret = GameStateMachine.UpdateStates.UPDATE_KEEP; if (moving) { Move(); } return(ret); }
public void Move() { if (moving) { if (currentPosition != targetPosition) { currentPosition += distanceToMove / movementSpeed; transform.position = currentPosition; } else { currentBox = targetBox; moving = false; ret = GameStateMachine.UpdateStates.UPDATENEXT; } } else { ret = GameStateMachine.UpdateStates.UPDATENEXT; } }
public GameStateMachine.UpdateStates UpdateEntity() { ret = GameStateMachine.UpdateStates.UPDATE_KEEP; if (moving) { Move (); } return ret; }