示例#1
0
 public void addUpdate(OnUpdateDelegate update)
 {
     onUpdate += update;
 }
示例#2
0
 public void removeUpdate(OnUpdateDelegate update)
 {
     onUpdate -= update;
 }
示例#3
0
 /// <summary>
 /// Removes a OnDetectedDelegate
 /// See docs for ()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void RemoveOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates -= del;
 }
示例#4
0
 /// <summary>
 /// This replaces all older delegates rather than adding a new one to the list.
 /// See docs for ()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void SetOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates = del;
 }
示例#5
0
 public void Register(IBaseModuleManager baseManager)
 {
     _onUpdateDelegate  += baseManager.OnUpdate;
     _onDrawDelegate    += baseManager.OnDraw;
     _onDestroyDelegate += baseManager.OnDestroy;
 }
示例#6
0
 /// <summary>
 /// Add a new delegate to be triggered everyframe while active, no matter what.
 /// There are two events which are more specific to the two states of the system:
 ///   1. When Idle (No Target)  - See the docs for OnIdleUpdateDelegate()
 ///   2. When There IS a target - See the docs for OnTargetUpdateDelegate()
 /// The delegate signature is:  delegate()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void AddOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates += del;
 }
 /// <summary>
 /// This replaces all older delegates rather than adding a new one to the list.
 /// See docs for ()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void SetOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates = del;
 }
 /// <summary>
 /// Removes a OnDetectedDelegate
 /// See docs for ()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void RemoveOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates -= del;
 }
 /// <summary>
 /// Add a new delegate to be triggered everyframe while active, no matter what.
 /// There are two events which are more specific to the two states of the system:
 ///   1. When Idle (No Target)  - See the docs for OnIdleUpdateDelegate()
 ///   2. When There IS a target - See the docs for OnTargetUpdateDelegate()
 /// The delegate signature is:  delegate()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void AddOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates += del;
 }
示例#10
0
 /// <summary>
 /// Add a new delegate to be triggered everyframe while active, no matter what.
 /// There are two events which are more specific to the two states of the system:
 ///   1. When Idle (No Target)  - See the docs for OnIdleUpdateDelegate()
 ///   2. When There IS a target - See the docs for OnTargetUpdateDelegate()
 /// The delegate signature is:  delegate()
 /// **This will only allow a delegate to be added once.**
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void AddOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates -= del;  // Cheap way to ensure unique (add only once)
     this.onUpdateDelegates += del;
 }
 /// <summary>
 /// Add a new delegate to be triggered everyframe while active, no matter what.
 /// There are two events which are more specific to the two states of the system:
 ///   1. When Idle (No Target)  - See the docs for OnIdleUpdateDelegate()
 ///   2. When There IS a target - See the docs for OnTargetUpdateDelegate()
 /// The delegate signature is:  delegate()
 /// **This will only allow a delegate to be added once.**
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void AddOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates -= del;  // Cheap way to ensure unique (add only once)
     this.onUpdateDelegates += del;
 }
 public void SetOnUpdateFunction(OnUpdateDelegate function)
 {
     onUpdateFunction = function;
 }
示例#13
0
 public override void Update()
 {
     OnUpdateDelegate?.Invoke();
 }