public ScriptHandle AddScript(MiniScript script)
        {
            MiniScript newScript = UnityEngine.Object.Instantiate(script);

            newScript.Initialize(fighter);
            toStart.Add(newScript);
            scripts.Add(newScript);
            return(new ScriptHandle()
            {
                Kill = () => Remove(newScript)
            });
        }
示例#2
0
 public void AddScript(MiniScript script)
 {
     Machine.AddScript(script);
 }
 private void Remove(MiniScript script)
 {
     script.OnEnd();
     scripts.Remove(script);
 }