Null() public static method

Shorthand for the U9NullTransition.
public static Null ( ) : U9NullTransition,
return U9NullTransition,
コード例 #1
0
ファイル: U9T.cs プロジェクト: bigstupidx/swip3
 public static void ValidateTransitionArray(U9Transition[] transitions)
 {
     for (int i = 0, ni = transitions.Length; i < ni; i++)
     {
         if (transitions[i] == null)
         {
             transitions[i] = U9T.Null();
         }
     }
 }
コード例 #2
0
 public virtual U9Transition GetDisplayTransition(bool force = false)
 {
     if ((!force && IsDisplaying))
     {
         //	Debug.LogWarning( name + " already " + State );
         return(U9T.Null());
     }
     else
     {
         state = ViewState.Displaying;
         U9Transition t = CreateDisplayTransition(force);
         AddDisplayTransitionListeners(t);
         return(t);
     }
 }
コード例 #3
0
ファイル: U9EventManager.cs プロジェクト: bigstupidx/swip3
    public U9Transition FireEvent(string eventID, object source, params object[] args)
    {
        //Debug.Log ("FIRE EVENT: " + eventID);
        U9Event      e;
        U9Transition transition = U9T.Null();

        if (events.TryGetValue(eventID, out e))
        {
            U9EventArgs eventArgs = e.OnFired(source, args);
            if (eventArgs != null && eventArgs.Transitions.Count > 0)
            {
                transition = U9T.P(eventArgs.Transitions.ToArray());
            }
        }
        return(transition);
    }
コード例 #4
0
    public virtual U9Transition GetHideTransition(bool force = false)
    {
//		if ( !force && !gameObject.activeInHierarchy) {
//			Hide ();
//			return U9T.Null ();
//		}
        if ((!force && !IsDisplaying))
        {
            //Debug.LogWarning( name + " already " + State );
            return(U9T.Null());
        }
        else
        {
            state = ViewState.Hiding;
            U9Transition t = CreateHideTransition(force);
            AddHideTransitionListeners(t);
            return(t);
        }
    }
コード例 #5
0
    /// <summary>
    /// Returns a transition that moves the block in the source position to the destination position
    /// </summary>
    /// <returns>The move block transition.</returns>
    /// <param name="sourceI">Source i.</param>
    /// <param name="sourceJ">Source j.</param>
    /// <param name="destI">Destination i.</param>
    /// <param name="destJ">Destination j.</param>
    U9Transition CreateMoveBlockTransition(int sourceI, int sourceJ, int destI, int destJ)
    {
        Block b = blocks [sourceI, sourceJ];

        // If the source block does not exist then return a null transition.
        if (!b)
        {
            return(U9T.Null());
        }

        //!!
        // If source and dest positions are the same then return a null transition
        if (sourceI == destI && sourceJ == destJ)
        {
            //return U9T.T (iTween.ShakePosition, b.gameObject, iTween.Hash ("x", 0.05f, "y", 0.05f, "time", 0.3f, "islocal", false));
            return(U9T.Null());
        }
        //!!

        // If the destination position is already occupied then return a null transition
        if (blocks [destI, destJ])
        {
            Debug.LogError("Destination is already occupied by a block!");
            return(U9T.Null());
        }

        // Move the block in data
        blocks [sourceI, sourceJ] = null;
        blocks [destI, destJ]     = b;

        // Update the blocks position
        b.I = destI;
        b.J = destJ;

        // Disable the fading on the block
        b.Ghost = false;

        // Return a tween to move the blocks gameObject

        //return U9T.HOT(HOTween.To, b.gameObject.transform, 0.3f, new TweenParms().Prop("localPosition", GridPosTo3DPos (destI, destJ, 0), false).Ease(EaseType.EaseOutCirc));
        //return U9T.T (iTween.MoveTo, b.gameObject, iTween.Hash ("position", GridPosTo3DPos (destI, destJ, 0), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutCirc ));
        return(U9T.LT(LeanTween.moveLocal, b.gameObject, GridPosTo3DPos(destI, destJ, 0), 0.3f, iTween.Hash("ease", LeanTweenType.easeOutCirc)));
    }