Exemple #1
0
    public IEnumerator StartMove()
    {
        nextMoveDirection     = transform.up;
        currentMoveDirection  = nextMoveDirection;
        previousMoveDirection = currentMoveDirection;
        yield return(snakeMeshContainer.DOSpawnAnimation());

        StartCoroutine(MoveToTurningPoint());
    }
Exemple #2
0
    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());
    }