public virtual void SetCamera(object follow, int w, int h) { LObjectCamera camera = new LObjectCamera(follow, w, h); SetCamera(camera); }
public void Destroy() { lock (this) { useKeyListener = false; useTouchListener = false; replaceLoading = false; replaceDelay.SetDelay(10); tx = ty = 0; isClose = true; CallEvents(false); isTranslate = false; isNext = false; isGravity = false; isCamera = false; isLock = true; if (touchs != null) { touchs.Clear(); touchs = null; } if (keys != null) { keys.Clear(); touchs = null; } if (sprites != null) { sprites.Dispose(); sprites = null; } if (desktop != null) { desktop.Dispose(); desktop = null; } if (currentScreen != null) { LTexture parent = currentScreen.GetParent(); if (parent != null) { parent.CloseChildAll(); parent.Destroy(); } else { currentScreen.Destroy(); } currentScreen = null; } if (gravityHandler != null) { gravityHandler.Dispose(); gravityHandler = null; } camera = null; if (releases != null) { foreach (LRelease r in releases) { if (r != null) { r.Dispose(); } } releases.Clear(); } Dispose(); } }
public virtual void SetCamera(LObjectCamera cam) { if (this.isCamera = (cam != null)) { this.camera = cam; } }