public void Activate() { isActive = true; //call the OnStateActivated event to allow the user to add more logic to the activate function Activating?.Invoke(this, EventArgs.Empty); }
public UIRenderable(Control control) { Debug.Assert(control is not null); _control = control; IsFrozen = true; // disable calling update method per frame HasShadow = false; Activating.Subscribe((f, ct) => SafeCast.As <UIRenderable>(f).OnActivating()); }
public void Activate() { Activating?.Invoke(this, this); Canvas.SetZIndex(this, 1); VisualStateManager.GoToState(this, "Active", false); Activated?.Invoke(this, this); }
/// <summary> /// Invoked before activating the SCP-914 machine. /// </summary> /// <param name="ev">The <see cref="ActivatingEventArgs"/> instance.</param> public static void OnActivating(ActivatingEventArgs ev) => Activating.InvokeSafely(ev);
protected virtual void OnActivating(EventArgs e) { Activating?.Invoke(this, e); }
public SkyBox() { Activating.Subscribe((f, ct) => SafeCast.As <SkyBox>(f).OnActivating()); }
public SkySphere() { Activating.Subscribe((f, ct) => SafeCast.As <SkySphere>(f).OnActivating()); }
public DeferredRenderingLayer(int sortNumber = DRLayerDefaultSort) : base(sortNumber) { _gBuffer = new GBuffer(); _postProcess = new PbrDeferredRenderingPostProcess(this, static screen => ref screen.Camera.View); Activating.Subscribe((l, ct) => SafeCast.As <DeferredRenderingLayer>(l).OnActivating()); }
public Cube() { Activating.Subscribe((f, ct) => SafeCast.As <Cube>(f).OnActivating()); }