Ejemplo n.º 1
0
    void Update()
    {
        if (linearMovementPipe01.isOnDestination())
        {
            canBeActivated = true;
        }

        if (suEGiu)
        {
            setLinearVariables();
        }

        handleSound();
    }
Ejemplo n.º 2
0
    void setLinearVariables()
    {
        linearMovement.setDestinationPosition(firstDest.transform.position);
        linearMovement.canReturnBack = true;
        linearMovement.pauseToSwitch = 0.0f;

        //if (actualTurningNum < turningNum)
        //{
        linearMovement.active = true;
        linearMovement.speed  = uberSpeed;
        if (linearMovement.isOnDestination() || linearMovement.isOnOrigin())
        {
            actualTurningNum++;
        }
        //}
        if (actualTurningNum > turningNum && linearMovement.isOnOrigin())
        {
            //Debug.Log ("entrato");
            actualTurningNum      = 0;
            linearMovement.active = false;
            suEGiu = false;
        }
    }