Ejemplo n.º 1
0
Archivo: Snake.cs Proyecto: akil03/BC
    public IEnumerator StartMove()
    {
        nextMoveDirection     = transform.up;
        currentMoveDirection  = nextMoveDirection;
        previousMoveDirection = currentMoveDirection;
        yield return(snakeMeshContainer.DOSpawnAnimation());

        StartCoroutine(MoveToTurningPoint());
    }
Ejemplo n.º 2
0
Archivo: Snake.cs Proyecto: akil03/bx
    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());
    }