public void Initialize(ActorStack stack) { this.myStack = stack; stateManager = Instantiate(stateManagerObject, transform).GetComponent <StateManager>(); stateManager.Initialize(this); decider = Instantiate(deciderObject, transform).GetComponent <Decider>(); decider.Initialize(this); }