Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (biDirectional)
     {
         moverTransform.localEulerAngles = oscillator.Evaluate(startRotation - magnitude, startRotation + magnitude);
     }
     else
     {
         moverTransform.localEulerAngles = oscillator.Evaluate(startRotation, startRotation + magnitude);
     }
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        Vector3 targetScale = originalScale;

        targetScale.Scale(magnitude);
        moverTransform.localScale = oscillator.Evaluate(originalScale, targetScale);
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        Vector3 newPos;

        if (biDirectional)
        {
            newPos = oscillator.Evaluate(startPos - magnitude, startPos + magnitude);
        }
        else
        {
            newPos = oscillator.Evaluate(startPos, startPos + magnitude);
        }

        if (localMotion)
        {
            moverTransform.localPosition = newPos;
        }
        else
        {
            moverTransform.position = newPos;
        }
    }