コード例 #1
0
ファイル: Snake.cs プロジェクト: akil03/BC
    public IEnumerator StartMove()
    {
        nextMoveDirection     = transform.up;
        currentMoveDirection  = nextMoveDirection;
        previousMoveDirection = currentMoveDirection;
        yield return(snakeMeshContainer.DOSpawnAnimation());

        StartCoroutine(MoveToTurningPoint());
    }
コード例 #2
0
ファイル: Snake.cs プロジェクト: 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());
    }