Example #1
0
        public StateLink AddStateLink()
        {
            StateLink sl = CreateInstance <StateLink>();

            sl.Init(this);
            GuidManager.GetGameByChain(this).Dirty = true;
            links.Add(sl);
            return(sl);
        }
Example #2
0
 private void OnEnable()
 {
     link = (StateLink)target;
     game = AssetDatabase.LoadAssetAtPath <PathGame>(AssetDatabase.GetAssetPath(link)) as PathGame;
     if (link.chain == null)
     {
         link.chain = game.chains[0];
         link.state = link.chain.StartState;
     }
 }
Example #3
0
 public void RemoveStateLink(StateLink link)
 {
     links.Remove(link);
     GuidManager.GetGameByChain(this).Dirty = true;
 }