예제 #1
0
        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);
        }
예제 #2
0
 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());
 }
예제 #3
0
        public void Activate()
        {
            Activating?.Invoke(this, this);

            Canvas.SetZIndex(this, 1);
            VisualStateManager.GoToState(this, "Active", false);

            Activated?.Invoke(this, this);
        }
예제 #4
0
파일: Scp914.cs 프로젝트: zabszk/EXILED
 /// <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);
예제 #5
0
 protected virtual void OnActivating(EventArgs e)
 {
     Activating?.Invoke(this, e);
 }
예제 #6
0
파일: SkyBox.cs 프로젝트: ikorin24/Elffy
 public SkyBox()
 {
     Activating.Subscribe((f, ct) => SafeCast.As <SkyBox>(f).OnActivating());
 }
예제 #7
0
 public SkySphere()
 {
     Activating.Subscribe((f, ct) => SafeCast.As <SkySphere>(f).OnActivating());
 }
예제 #8
0
 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());
 }
예제 #9
0
 public Cube()
 {
     Activating.Subscribe((f, ct) => SafeCast.As <Cube>(f).OnActivating());
 }