コード例 #1
0
        private void CreateSuperState(Vector2 position)
        {
            var superState = SuperState.WithStart();

            if (!graph.states.Any())
            {
                superState.isStart          = true;
                superState.nest.embed.title = "Start";
            }

            AddState(superState, position);
        }
コード例 #2
0
 public override void PerformDragAndDrop()
 {
     if (DragAndDropUtility.Is <ScriptGraphAsset>())
     {
         var flowMacro = DragAndDropUtility.Get <ScriptGraphAsset>();
         var flowState = new FlowState(flowMacro);
         AddState(flowState, DragAndDropUtility.position);
     }
     else if (DragAndDropUtility.Is <StateGraphAsset>())
     {
         var asset      = DragAndDropUtility.Get <StateGraphAsset>();
         var superState = new SuperState(asset);
         AddState(superState, DragAndDropUtility.position);
     }
 }