Beispiel #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            UITween t = target as UITween;

            if (!t)
            {
                return;
            }
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (t.isPlaying && GUILayout.Button("Stop", GUILayout.Width(100)))
            {
                t.Stop();
            }
            if (!t.isPlaying && GUILayout.Button("Play", GUILayout.Width(100)))
            {
                t.Play();
            }
            if (!t.isPlaying && GUILayout.Button("Restore", GUILayout.Width(100)))
            {
                t.Restore();
            }
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }
Beispiel #2
0
 static int Play(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UITween obj  = (UITween)ToLua.CheckObject(L, 1, typeof(UITween));
         bool    arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.Play(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #3
0
    // 延时收缩
    IEnumerator DelayShrink(UITween tween)
    {
        yield return(new WaitForSeconds(lifeTime));

        tween.Play(true);
    }