예제 #1
0
 void DrawTargetButtons(TweenInfo twInfo, TweenGroup twGroup)
 {
     if (GUILayout.Button(twGroup == TweenGroup.Running ? "Pause" : "Play", HOGUIStyle.BtTinyStyle, GUILayout.Width(45))) {
         if (twGroup == TweenGroup.Running) {
             twInfo.tween.Pause();
         } else {
             twInfo.tween.Play();
         }
     }
     if (GUILayout.Button("Kill", HOGUIStyle.BtTinyStyle, GUILayout.Width(32))) {
         twInfo.tween.Kill();
     }
 }
예제 #2
0
        // ===================================================================================
        // METHODS ---------------------------------------------------------------------------

        void DrawTarget(TweenInfo twInfo, object twTarget, TweenGroup twGroup, bool isSequenced)
        {
            GUILayout.BeginHorizontal();
            if (isSequenced) GUILayout.Space(9);
            if (GUILayout.Button(twTarget.ToString(), HOGUIStyle.BtLabelStyle)) {
                SelectTargetGameObject(twTarget);
            }
            if (!isSequenced && twGroup != TweenGroup.Disabled) {
                DrawTargetButtons(twInfo, twGroup);
            }
            GUILayout.EndHorizontal();
            if (!isSequenced && twGroup != TweenGroup.Disabled) {
                DrawInfo(twInfo);
            }
        }
예제 #3
0
 void DrawInfo(TweenInfo twInfo)
 {
     bool hasId = twInfo.tween.id != "";
     string s = "Id: " + (hasId ? twInfo.tween.id : "-") + ", Loops: " + twInfo.tween.completedLoops + "/" + twInfo.tween.loops;
     GUILayout.Label(s, HOGUIStyle.LabelSmallStyle);
 }
예제 #4
0
 /// <summary>
 /// Returns a <see cref="TweenInfo"/> list of the current tweens (paused and delayed included),
 /// or null if there are no tweens.
 /// </summary>
 /// <returns></returns>
 public static TweenInfo[] GetTweenInfos()
 {
     if (totTweens <= 0) return null;
     int tweensCount = tweens.Count;
     TweenInfo[] twInfos = new TweenInfo[tweensCount];
     for (int i = 0; i < tweensCount; ++i) twInfos[i] = new TweenInfo(tweens[i]);
     return twInfos;
 }