Example #1
0
    private void ApplieByRooting(bool forSine, bool setOrAdd, Vector3 waveFrame, ROOTING rooting)
    {
        switch (rooting)
        {
        case ROOTING.None: break;

        case ROOTING.mainPosition:
        {
            mainTargetTransform.position = SetOrAdd(setOrAdd, mainTargetTransform.position, waveFrame);
            break;
        }

        case ROOTING.mainRotation:
        {
            mainTargetTransform.Rotate(SetOrAdd(setOrAdd, mainTargetTransform.eulerAngles, waveFrame));
            break;
        }

        case ROOTING.mainScale:
        {
            mainTargetTransform.localScale = SetOrAdd(setOrAdd, mainTargetTransform.localScale, waveFrame);
            break;
        }

        case ROOTING.otherPosition:
        {
            otherTargetTransform.position = SetOrAdd(setOrAdd, otherTargetTransform.position, waveFrame);
            break;
        }

        case ROOTING.otherRotation:
        {
            otherTargetTransform.Rotate(SetOrAdd(setOrAdd, otherTargetTransform.eulerAngles, waveFrame));
            break;
        }

        case ROOTING.otherScale:
        {
            otherTargetTransform.localScale = SetOrAdd(setOrAdd, otherTargetTransform.localScale, waveFrame);
            break;
        }
        }
    }
Example #2
0
 private void ApplieByRooting(bool forSine, bool setOrAdd, Vector3 waveFrame, ROOTING rooting)
 {
     switch (rooting)
     {
         case ROOTING.None: break;
         case ROOTING.mainPosition:
             {
                 mainTargetTransform.position = SetOrAdd(setOrAdd, mainTargetTransform.position, waveFrame);
                 break;
             }
         case ROOTING.mainRotation:
             {
                 mainTargetTransform.Rotate(SetOrAdd(setOrAdd, mainTargetTransform.eulerAngles, waveFrame));
                 break;
             }
         case ROOTING.mainScale:
             {
                 mainTargetTransform.localScale = SetOrAdd(setOrAdd, mainTargetTransform.localScale, waveFrame);
                 break;
             }
         case ROOTING.otherPosition:
             {
                 otherTargetTransform.position = SetOrAdd(setOrAdd, otherTargetTransform.position, waveFrame);
                 break;
             }
         case ROOTING.otherRotation:
             {
                 otherTargetTransform.Rotate(SetOrAdd(setOrAdd, otherTargetTransform.eulerAngles, waveFrame));
                 break;
             }
         case ROOTING.otherScale:
             {
                 otherTargetTransform.localScale = SetOrAdd(setOrAdd, otherTargetTransform.localScale, waveFrame);
                 break;
             }
     }
 }