Exemplo n.º 1
0
 internal static bool SetShake(TweenerCore <Vector3, Vector3[], Vector3ArrayOptions> t)
 {
     if (!SpecialPluginsUtils.SetPunch(t))
     {
         return(false);
     }
     t.easeType = Ease.Linear;
     return(true);
 }
Exemplo n.º 2
0
        internal static bool SetCameraShakePosition(TweenerCore <Vector3, Vector3[], Vector3ArrayOptions> t)
        {
            if (!SpecialPluginsUtils.SetShake(t))
            {
                return(false);
            }
            Camera camera = t.target as Camera;

            if ((Object)camera == (Object)null)
            {
                return(false);
            }
            Vector3   b         = t.getter();
            Transform transform = camera.transform;
            int       num       = t.endValue.Length;

            for (int i = 0; i < num; i++)
            {
                Vector3 a = t.endValue[i];
                t.endValue[i] = transform.localRotation * (a - b) + b;
            }
            return(true);
        }