예제 #1
0
 void Start()
 {
     // StartCoroutine(WaitCoroutine(2));
     // StartCoroutine(UpdateCoroutine());
     // StartCoroutine(AnimationTools.MultiTranslateCoroutine(this, 5, Easings.EasingFunctionDelegate(m_EasingFunction)));
     StartCoroutine(InOutActionCoroutine(
                        () => { MDebug.Log("in"); },
                        () => { MDebug.Log("out"); },
                        AnimationTools.MultiTranslateCoroutine(this, 5, Easings.EasingFunctionDelegate(m_EasingFunction))
                        ));
 }
예제 #2
0
 /// <summary>
 /// Methode deprecie pour faire du debug
 /// Permet d afficher des bouttons a l ecran
 /// </summary>
 private void OnGUI()
 {
     GUILayout.BeginArea(new Rect(0, 0, Screen.width * .5f, Screen.height * .5f));
     if (GUILayout.Button("RESIZE"))
     {
         StartCoroutine(AnimationTools.ResizeCoroutine(this, transform.localScale * 2, 5f));
     }
     if (GUILayout.Button("START TRANSLATE"))
     {
         m_TranslateCoroutine = AnimationTools.MultiTranslateCoroutine(this, 40, Easings.EasingFunctionDelegate(m_EasingFunction));
         StartCoroutine(m_TranslateCoroutine);
     }
     if (GUILayout.Button("STOP TRANSLATE") && m_TranslateCoroutine != null)
     {
         StopCoroutine(m_TranslateCoroutine);
         m_TranslateCoroutine = null;
     }
     if (GUILayout.Button("STOP Update"))
     {
         m_MustStopUpdateCoroutine = true;
     }
     GUILayout.EndArea();
 }