예제 #1
0
    private void ChangeScale()
    {
        float newScale = CountNewScaleValue(AudioAnalysis.GetPitchValue());

        if (newScale == 0)
        {
            return;
        }
        this.transform.localScale = new Vector3(newScale, newScale, newScale);
    }
예제 #2
0
    void CheckAudioConditionForPush()
    {
        currentRadius = Vector3.Magnitude(target.transform.position - transform.position);

        if (!pushState)
        {
            if (GAME_TIME - startPushingTime > timeDeltaCheck)
            {
                currentPitch = AudioAnalysis.GetPitchValue();
                if (currentPitch >= pithRangePush[0] && currentPitch <= pithRangePush[1])
                {
                    pushState        = true;
                    startPushingTime = GAME_TIME;
                    //currentPushType = Random.Range(1, 3);
                    //if (currentPushType == STRAIGHT_PUSH)
                    //{
                    //    LinearCoefSelection(currentRadius, currentRadius - currentRadius * 0.2f, yeStraightMinSpeed, yeStraightMaxSpeed, yeStraightAccelerationCoefArray);
                    //}
                    //else if (currentPushType == CIRCLE_PUSH)
                    //{

                    //}
                }
            }
        }
        else
        {
            if (GAME_TIME - startPushingTime > yeCircleMovingTime)
            {
                simpleSpeed = yeSpeed;
                pushState   = false;
            }
            //if (currentPushType == CIRCLE_PUSH)
            //{
            //    circlePushState = true;
            //    if (GAME_TIME - startPushingTime > 0.2)
            //    {
            //        simpleSpeed = yeSpeed;
            //        circlePushState = false;
            //        pushState = false;
            //    }
            //}
            //else if (currentPushType == STRAIGHT_PUSH)
            //{
            //    simpleSpeed = UpdateValueWithLinearCoef(yeStraightAccelerationCoefArray, currentRadius);
            //    if (simpleSpeed >= yeStraightMaxSpeed)
            //    {
            //        simpleSpeed = yeSpeed;
            //        pushState = false;
            //    }
            //}
        }
    }
예제 #3
0
    protected bool IsAudioSignalCondition()
    {
        float soundValue = AudioAnalysis.GetPitchValue();

        return(true);
    }