public void RegisterEventHandler(IUserDefinedTargetEventHandler eventHandler) { this.mHandlers.Add(eventHandler); if (this.mOnInitializedCalled) { eventHandler.OnInitialized(); } }
/// <summary> /// Registers an event handler with this UserDefinedTargetBuildingBehaviour which will be called on events /// </summary> public void RegisterEventHandler(IUserDefinedTargetEventHandler eventHandler) { mHandlers.Add(eventHandler); // in case initialization has already happened: if (mOnInitializedCalled) { eventHandler.OnInitialized(); } }
/// <summary> /// Registers an event handler with this UserDefinedTargetBuildingBehaviour which will be called on events /// </summary> public void RegisterEventHandler(IUserDefinedTargetEventHandler eventHandler) { mHandlers.Add(eventHandler); // in case initialization has already happened: if (mOnInitializedCalled) eventHandler.OnInitialized(); }