예제 #1
0
 public void RegisterEventHandler(IUserDefinedTargetEventHandler eventHandler)
 {
     this.mHandlers.Add(eventHandler);
     if (this.mOnInitializedCalled)
     {
         eventHandler.OnInitialized();
     }
 }
예제 #2
0
    /// <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();
    }