private void Awake() { behaviourProxies = new BehaviourProxy[Enum.GetValues(typeof(BehaviourManager.Behaviour)).Length]; behaviourProxies[GetBehaviourIndex(Behaviour.START)] += () => { }; behaviourProxies[GetBehaviourIndex(Behaviour.UPDATE)] += () => { }; behaviourProxies[GetBehaviourIndex(Behaviour.FIXED_UPDATE)] += () => { }; instance = this; }
public void UnregisterBehaviourProxy(Behaviour behaviour, BehaviourProxy proxy) { behaviourProxies[GetBehaviourIndex(behaviour)] -= proxy; }
public void RegisgerBehaviourProxy(Behaviour behaviour, BehaviourProxy proxy) { behaviourProxies[GetBehaviourIndex(behaviour)] += proxy; }