public IEnumerator StartMove() { nextMoveDirection = transform.up; currentMoveDirection = nextMoveDirection; previousMoveDirection = currentMoveDirection; yield return(snakeMeshContainer.DOSpawnAnimation()); StartCoroutine(MoveToTurningPoint()); }
public IEnumerator StartMove() { if (!isBot) { if (playerID == 1) { nextMoveDirection = transform.up; } else { nextMoveDirection = -transform.up; } } else { nextMoveDirection = -transform.up; } currentMoveDirection = nextMoveDirection; previousMoveDirection = currentMoveDirection; yield return(snakeMeshContainer.DOSpawnAnimation()); StartCoroutine(MoveToTurningPoint()); }