Exemplo n.º 1
0
 /// <summary>
 /// Callback when the this Node is transitioning to another Node through the passed Transition
 /// </summary>
 protected internal virtual void OnLeave(Transition transition)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// Callback when the Transition was created
 /// </summary>
 protected internal virtual void OnAddTransition(Transition transition)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Callback when the this Node is being transitioned to. 
 /// OriginTransition is the transition from which was transitioned to this node OR null if the transitioning process was started on this Node
 /// </summary>
 protected internal virtual void OnEnter(Transition originTransition)
 {
 }
 public virtual void OnRemoveTransition(Transition transition)
 {
 }
 // Transition
 public virtual void OnAddTransition(Transition transition)
 {
 }
 public static void IssueOnRemoveTransition(Transition transition)
 {
     if (OnRemoveTransition != null)
         OnRemoveTransition.Invoke ( transition);
     for (int cnt = 0; cnt < receiverCount; cnt++)
     {
         if (callbackReceiver [cnt] == null)
             callbackReceiver.RemoveAt (cnt--);
         else
             callbackReceiver [cnt].OnRemoveTransition ( transition);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Callback when the Transition was created
 /// </summary>
 protected internal virtual void OnAddTransition(Transition transition)
 {
 }
Exemplo n.º 8
0
        private void SaveNewTransition(Transition transition)
        {
            if (!mainNodeCanvas.nodes.Contains (transition.startNode) || !mainNodeCanvas.nodes.Contains (transition.endNode))
                throw new UnityException ("Cache system: Writing new Transition to save file failed as Node members are not part of the Cache!");
            string path = tempSessionPath + "/LastSession.asset";
            if (AssetDatabase.GetAssetPath (mainNodeCanvas) != path)
                throw new UnityException ("Cache system error: Current Canvas is not saved as the temporary cache!");
            NodeEditorSaveManager.AddSubAsset (transition, path);

            AssetDatabase.SaveAssets ();
            AssetDatabase.Refresh ();
        }