public static LTransition NewPShadow(PShadowEffect effect) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _PShadow(effect)); transition.SetDisplayGameUI(true); transition.code = 1; return(transition); } return(null); }
public static LTransition NewEmpty() { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Empty()); transition.SetDisplayGameUI(false); transition.code = 0; return(transition); } return(null); }
public static LTransition NewCross(int c, LTexture texture) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Cross(c, texture)); transition.SetDisplayGameUI(true); transition.code = 1; return(transition); } return(null); }
public static LTransition NewFade(int type, LColor c) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Fade(type, c)); transition.SetDisplayGameUI(true); transition.code = 1; return(transition); } return(null); }
public static LTransition NewCycle(int type) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Cycle(type)); transition.SetDisplayGameUI(false); transition.code = 0; return(transition); } return(null); }
public static LTransition NewCross(int c, LTexture texture) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Cross(c, texture)); transition.SetDisplayGameUI(true); transition.code = 1; return transition; } return null; }
public static LTransition NewArc(LColor c) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Arc(c)); transition.SetDisplayGameUI(true); transition.code = 1; return transition; } return null; }
public static LTransition NewFadeIn() { return(LTransition.NewFade(ISprite_Constants.TYPE_FADE_IN)); }
public static LTransition NewPShadow(PShadowEffect effect) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _PShadow(effect)); transition.SetDisplayGameUI(true); transition.code = 1; return transition; } return null; }
public static LTransition NewEmpty() { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Empty()); transition.SetDisplayGameUI(false); transition.code = 0; return transition; } return null; }
private void SetScreen(Screen @screen, bool @put) { lock (this) { if (screen == null) { this.isInstance = false; throw new RuntimeException( "Cannot create a [Screen] instance !"); } InitDestory(); if (!LSystem.isLogo) { if (currentControl != null) { SetTransition(screen.OnTransition()); } else { LTransition transition = screen.OnTransition(); if (transition == null) { switch (MathUtils.Random(0, 3)) { case 0: transition = LTransition.NewFadeIn(); break; case 1: transition = LTransition.NewArc(); break; case 2: transition = LTransition .NewSplitRandom(LColor.black); break; case 3: transition = LTransition .NewCrossRandom(LColor.black); break; } } SetTransition(transition); } } screen.SetOnLoadState(false); if (currentControl == null) { currentControl = screen; } else { lock (currentControl) { currentControl.Destroy(); currentControl = screen; } } this.isInstance = true; if (screen is EmulatorListener) { SetEmulatorListener((EmulatorListener)screen); } else { SetEmulatorListener(null); } StartTransition(); screen.OnCreate(LSystem.screenRect.width, LSystem.screenRect.height); if (!running || GLEx.Device == null || loading_Control != null) { screen.SetClose(false); screen.OnLoad(); screen.SetOnLoadState(true); screen.OnLoaded(); EndTransition(); } else { Thread load = null; try { load = new _LoadingScreen(this, screen); load.Start(); } catch (System.Exception ex) { throw new RuntimeException(currentControl.GetName() + " onLoad:" + ex.Message); } finally { load = null; } } if (screen != null) { if (screen is LFlickerListener) { if (currentInput != null) { currentInput.Flicker = (LFlickerListener)screen; } } } if (put) { screens.AddLast(screen); } loading_Control = null; Thread.Yield(); } }
public static LTransition NewCycle(int type) { if (GLEx.Self != null) { LTransition transition = new LTransition(); transition.SetTransitionListener(new _Cycle(type)); transition.SetDisplayGameUI(false); transition.code = 0; return transition; } return null; }
private void SetScreen(Screen screen, bool put) { if (currentControl != null && currentControl.IsOnLoadComplete()) { return; } lock (this) { if (screen == null) { this.isInstance = false; throw new RuntimeException( "Cannot create a [Screen] instance !"); } GLLoader.Destory(); if (!LSystem.isLogo) { if (currentControl != null) { SetTransition(screen.OnTransition()); } else { LTransition transition = screen.OnTransition(); if (transition == null) { switch (MathUtils.Random(0, 3)) { case 0: transition = LTransition.NewFadeIn(); break; case 1: transition = LTransition.NewArc(); break; case 2: transition = LTransition .NewSplitRandom(LColor.black); break; case 3: transition = LTransition .NewCrossRandom(LColor.black); break; } } SetTransition(transition); } } screen.SetOnLoadState(false); if (currentControl == null) { currentControl = screen; } else { lock (currentControl) { currentControl.Destroy(); currentControl = screen; } } this.isInstance = true; if (screen is EmulatorListener) { SetEmulatorListener((EmulatorListener)screen); } else { SetEmulatorListener(null); } screen.OnCreate(LSystem.screenRect.width, LSystem.screenRect.height); LSystem.CallScreenRunnable(new _LoadingScreen(this, screen)); if (put) { screens.AddLast(screen); } loading_Control = null; } }
public void SetTransition(LTransition t) { this.transition = t; }
public static LTransition NewFadeOut() { return(LTransition.NewFade(ISprite_Constants.TYPE_FADE_OUT)); }
public static LTransition NewFadeIn() { return(LTransition.NewFade(FadeEffect.TYPE_FADE_IN)); }
public static LTransition NewFadeOut() { return(LTransition.NewFade(FadeEffect.TYPE_FADE_OUT)); }
public static LTransition NewFade(int type) { return(LTransition.NewFade(type, LColor.black)); }