Exemplo n.º 1
0
 bool validate()
 {
     // ReSharper disable AssignNullToNotNullAttribute
     if (isSimple)
     {
         _complex = default;
     }
     else
     {
         _simple = default;
     }
     // ReSharper restore AssignNullToNotNullAttribute
     return(true);
 }
Exemplo n.º 2
0
        // ReSharper restore NotNullMemberIsNotInitialized, FieldCanBeMadeReadOnly.Local, ConvertToConstant.Local
#pragma warning restore 649

        #endregion

        [PublicAPI] public SerializedEase(SimpleSerializedEase simple)
        {
            _isComplex = false;
            _simple    = simple;
        }
Exemplo n.º 3
0
        [PublicAPI] public static Ease toEase(this SimpleSerializedEase simple)
        {
            switch (simple)
            {
            case SimpleSerializedEase.Linear: return(Eases.linear);

            case SimpleSerializedEase.QuadIn: return(Eases.quadIn);

            case SimpleSerializedEase.QuadOut: return(Eases.quadOut);

            case SimpleSerializedEase.QuadInOut: return(Eases.quadInOut);

            case SimpleSerializedEase.CubicIn: return(Eases.cubicIn);

            case SimpleSerializedEase.CubicOut: return(Eases.cubicOut);

            case SimpleSerializedEase.CubicInOut: return(Eases.cubicInOut);

            case SimpleSerializedEase.QuartIn: return(Eases.quartIn);

            case SimpleSerializedEase.QuartOut: return(Eases.quartOut);

            case SimpleSerializedEase.QuartInOut: return(Eases.quartInOut);

            case SimpleSerializedEase.QuintIn: return(Eases.quintIn);

            case SimpleSerializedEase.QuintOut: return(Eases.quintOut);

            case SimpleSerializedEase.QuintInOut: return(Eases.quintInOut);

            case SimpleSerializedEase.SineIn: return(Eases.sineIn);

            case SimpleSerializedEase.SineOut: return(Eases.sineOut);

            case SimpleSerializedEase.SineInOut: return(Eases.sineInOut);

            case SimpleSerializedEase.CircularIn: return(Eases.circularIn);

            case SimpleSerializedEase.CircularOut: return(Eases.circularOut);

            case SimpleSerializedEase.CircularInOut: return(Eases.circularInOut);

            case SimpleSerializedEase.ExpoIn: return(Eases.expoIn);

            case SimpleSerializedEase.ExpoOut: return(Eases.expoOut);

            case SimpleSerializedEase.ExpoInOut: return(Eases.expoInOut);

            case SimpleSerializedEase.ElasticIn: return(Eases.elasticIn);

            case SimpleSerializedEase.ElasticOut: return(Eases.elasticOut);

            case SimpleSerializedEase.ElasticInOut: return(Eases.elasticInOut);

            case SimpleSerializedEase.BackIn: return(Eases.backIn);

            case SimpleSerializedEase.BackOut: return(Eases.backOut);

            case SimpleSerializedEase.BackInOut: return(Eases.backInOut);

            case SimpleSerializedEase.BounceIn: return(Eases.bounceIn);

            case SimpleSerializedEase.BounceOut: return(Eases.bounceOut);

            case SimpleSerializedEase.BounceInOut: return(Eases.bounceInOut);

            default: throw new Exception($"Unknown ease {simple}, returning linear!");
            }
        }