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) }); }
public void AddScript(MiniScript script) { Machine.AddScript(script); }
private void Remove(MiniScript script) { script.OnEnd(); scripts.Remove(script); }