コード例 #1
0
ファイル: TweenNode.cs プロジェクト: TheHumanBuilders/journey
        //-------------------------------------------------------------------------
        // Auto Node API
        //-------------------------------------------------------------------------
        public override void Handle(GraphEngine graphEngine)
        {
            if (Target == null)
            {
                Debug.Log("Tween Node in graph \"" + graphEngine.GetCurrentGraph().GraphName + "\" is missing a target to move.");
                return;
            }

            if (Destination == null)
            {
                Debug.Log("Tween Node in graph \"" + graphEngine.GetCurrentGraph().GraphName + "\" is missing a destination.");
                return;
            }

            if (PauseGraph)
            {
                if (graphEngine.LockNode())
                {
                    new UnityTask(Tween(graphEngine));
                }
            }
            else
            {
                new UnityTask(Tween(graphEngine));
            }
        }
コード例 #2
0
 //-------------------------------------------------------------------------
 // Auto Node API
 //-------------------------------------------------------------------------
 public override void Handle(GraphEngine graphEngine)
 {
     if (target != null)
     {
         GameManager.Player.Physics.Position = target.position;
     }
     else
     {
         Debug.LogWarning("SetPlayerPosition Node in graph \"" + graphEngine.GetCurrentGraph().GraphName + "\" is missing a target position. Go into the AutoGraph editor for this graph and find the node with the missing target.");
     }
 }
コード例 #3
0
        public void SkipBattle()
        {
            BattleEndMarkerNode endNode = graphEngine.GetCurrentGraph().FindNode <BattleEndMarkerNode>();

            if (endNode != null)
            {
                graphEngine.SetCurrentNode(endNode);
                graphEngine.Continue();
            }
            else
            {
                Debug.LogWarning("Add a Battle End Marker Node to the boss' graph to be able to skip this battle!");
            }
        }
コード例 #4
0
 //-------------------------------------------------------------------------
 // Auto Node API
 //-------------------------------------------------------------------------
 public override void Handle(GraphEngine graphEngine)
 {
     if (target != null)
     {
         if (PauseGraph)
         {
             if (graphEngine.LockNode())
             {
                 new UnityTask(TryWalk(graphEngine));
             }
         }
         else
         {
             new UnityTask(TryWalk(graphEngine));
         }
     }
     else
     {
         Debug.LogWarning("WalkToPosition Node in graph \"" + graphEngine.GetCurrentGraph().GraphName + "\" is missing a target position for the player to walk to. Go into the AutoGraph editor for this graph and find the node with the missing target.");
     }
 }