public virtual void OnStart() { OnStartDelegate del = (OnStartDelegate)Lua.GetFunction(typeof(OnStartDelegate), "OnStart"); if (del != null) { del(); } }
/// <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; } }
/// <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> /// Removes a OnDetectedDelegate /// See docs for AddOnStartDelegate() /// </summary> /// <param name="del">An OnStartDelegate</param> public void RemoveOnStartDelegate(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; }
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; }
/// <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; }