Ejemplo n.º 1
0
        public virtual void OnStart()
        {
            OnStartDelegate del = (OnStartDelegate)Lua.GetFunction(typeof(OnStartDelegate), "OnStart");

            if (del != null)
            {
                del();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a listener for the OnStart event.
 /// </summary>
 /// <param name="del">Del.</param>
 public void OnStart(OnStartDelegate del)
 {
     if (hasStarted)
     {
         del();
     }
     else
     {
         onStartDelegate += del;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// This replaces all older delegates rather than adding a new one to the list.
 /// See docs for AddOnStartDelegate()
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void SetOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates = del;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Removes a OnDetectedDelegate
 /// See docs for AddOnStartDelegate()
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void RemoveOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates -= del;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Add a new delegate to be triggered when the firing system first starts up. 
 /// This happens on OnEnable (which is also run after Awake when first instanced)
 /// The delegate signature is:  delegate()
 /// See TargetTracker documentation for usage of the provided '...'
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void AddOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates += del;
 }
Ejemplo n.º 6
0
 public Quest RegisterStartCallback(OnStartDelegate callback)
 {
     this.OnStart = callback;
     return(this);
 }
 /// <summary>
 /// Removes a OnDetectedDelegate
 /// See docs for AddOnStartDelegate()
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void RemoveOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates -= del;
 }
 /// <summary>
 /// This replaces all older delegates rather than adding a new one to the list.
 /// See docs for AddOnStartDelegate()
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void SetOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates = del;
 }
 /// <summary>
 /// Add a new delegate to be triggered when the firing system first starts up.
 /// This happens on OnEnable (which is also run after Awake when first instanced)
 /// The delegate signature is:  delegate()
 /// See TargetTracker documentation for usage of the provided '...'
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void AddOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates += del;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Add a new delegate to be triggered when the firing system first starts up.
 /// This happens on OnEnable (which is also run after Awake when first instanced)
 /// The delegate signature is:  delegate()
 /// See TargetTracker documentation for usage of the provided '...'
 /// **This will only allow a delegate to be added once.**
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void AddOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates -= del;  // Cheap way to ensure unique (add only once)
     this.onStartDelegates += del;
 }
 /// <summary>
 /// Add a new delegate to be triggered when the firing system first starts up. 
 /// This happens on OnEnable (which is also run after Awake when first instanced)
 /// The delegate signature is:  delegate()
 /// See TargetTracker documentation for usage of the provided '...'
 /// **This will only allow a delegate to be added once.**
 /// </summary>
 /// <param name="del">An OnStartDelegate</param>
 public void AddOnStartDelegate(OnStartDelegate del)
 {
     this.onStartDelegates -= del;  // Cheap way to ensure unique (add only once)
     this.onStartDelegates += del;
 }