Пример #1
0
 protected override void PreDestory()
 {
     PTweener.clear();
     if (isClearSound)
     {
         PSound.destroy();
     }
 }
Пример #2
0
 protected override void UpdateOneLoop()
 {
     if (isEnableSound)
     {
         PSound.update();
     }
     PTweener.update();
     base.UpdateOneLoop();
 }
Пример #3
0
    // for iOS (ExecutionEngineException: Attempting to JIT compile method * while running with –aot-only.)
    static public void unusedCode()
    {
        PTween <int>        ti  = PTweener.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear) as PTween <int>;
        PTween <float>      tf  = PTweener.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear) as PTween <float>;
        PTween <Color>      tc  = PTweener.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear) as PTween <Color>;
        PTween <Vector2>    tv2 = PTweener.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear) as PTween <Vector2>;
        PTween <Vector3>    tv3 = PTweener.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear) as PTween <Vector3>;
        PTween <Vector4>    tv4 = PTweener.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear) as PTween <Vector4>;
        PTween <Quaternion> tq  = PTweener.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear) as PTween <Quaternion>;

        ti.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        ti.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        ti.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        ti.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        ti.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        ti.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        ti.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tf.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        tf.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tf.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tf.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tf.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tf.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tf.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tc.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        tc.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tc.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tc.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tc.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tc.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tc.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tv2.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        tv2.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tv2.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tv2.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tv2.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tv2.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tv2.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tv3.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        tv3.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tv3.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tv3.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tv3.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tv3.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tv3.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tv4.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tv4.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tv4.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tv4.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tv4.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tv4.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        tq.tween <int>(null, "hint", default(int), default(int), 1.0f, PEase.Linear);
        tq.tween <float>(null, "hint", default(float), default(float), 1.0f, PEase.Linear);
        tq.tween <Color>(null, "hint", default(Color), default(Color), 1.0f, PEase.Linear);
        tq.tween <Vector2>(null, "hint", default(Vector2), default(Vector2), 1.0f, PEase.Linear);
        tq.tween <Vector3>(null, "hint", default(Vector3), default(Vector3), 1.0f, PEase.Linear);
        tq.tween <Vector4>(null, "hint", default(Vector4), default(Vector4), 1.0f, PEase.Linear);
        tq.tween <Quaternion>(null, "hint", Quaternion.identity, Quaternion.identity, 1.0f, PEase.Linear);

        PTweener.clear();
    }
Пример #4
0
 public static void removeOneTween(PTween t)
 {
     PTweener.removeOne(t);
 }
Пример #5
0
 public static void clearTweens()
 {
     PTweener.clear();
 }
Пример #6
0
 public static PTween wait(float duration = 1.0f)
 {
     return(PTweener.tween(null, null, 0.0f, 1.0f, duration, PEase.Linear, null));
 }
Пример #7
0
 public static PTween tween <T>(T from, T to, float duration = 1.0f)
 {
     return(PTweener.tween(null, null, from, to, duration, PEase.Linear, null));
 }
Пример #8
0
 public static PTween tween <T>(T from, T to, float duration, PTweenEaseFunc easeFunc, PTweenOnComplete onComplete = null, params object[] props)
 {
     return(PTweener.tween(null, null, from, to, duration, easeFunc, onComplete, props));
 }
Пример #9
0
 public static PTween tween <T>(System.Object obj, string name, T from, T to, float duration = 1.0f)
 {
     return(PTweener.tween(obj, name, from, to, duration, PEase.Linear, null));
 }
Пример #10
0
 // Tweener
 public static PTween tween <T>(System.Object obj, string name, T from, T to, float duration, PTweenEaseFunc easeFunc, PTweenOnComplete onComplete = null, params object[] props)
 {
     return(PTweener.tween(obj, name, from, to, duration, easeFunc, onComplete, props));
 }