コード例 #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;
 }
コード例 #7
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;
 }
コード例 #8
0
 /// <summary>
 /// Removes a OnDetectedDelegate
 /// See docs for ()
 /// </summary>
 /// <param name="del">An OnUpdateDelegate</param>
 public void RemoveOnUpdateDelegate(OnUpdateDelegate del)
 {
     this.onUpdateDelegates -= del;
 }
コード例 #9
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;
 }
コード例 #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;
 }
コード例 #11
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;
 }
コード例 #12
0
 public void SetOnUpdateFunction(OnUpdateDelegate function)
 {
     onUpdateFunction = function;
 }
コード例 #13
0
ファイル: NPCStateNode.cs プロジェクト: Kevin-Beck/BulletRPG
 public override void Update()
 {
     OnUpdateDelegate?.Invoke();
 }