private void InitialCamera() { BaseGame.CoordinMgr.SetScreenViewRect(new Rectangle(0, 0, 800, 600)); camera = new Camera(1f, new Vector2(400, 300), 0); camera.maxScale = 4.5f; camera.minScale = 0.5f; camera.Enable(); }
public FindPathGameScreen( IAI tankAI ) { BaseGame.CoordinMgr.SetScreenViewRect( scrnRect ); camera = new Camera( 2, cameraStartPos, 0f ); compass = new Compass( new Vector2( 740, 540 ) ); camera.Enable(); InitialBackGround(); InitialScene(); InitialAI( tankAI ); camera.Focus( tank, true ); GameTimer timer = new GameTimer( 5, delegate() { TextEffectMgr.AddRiseFadeInScrnCoordin( "test FadeUp in Scrn!", new Vector2( 100, 100 ), 1f, Color.Black, LayerDepth.Text, GameFonts.Lucida, 300, 0.5f ); TextEffectMgr.AddRiseFade( "test FadeUp in Login!", new Vector2( 100, 100 ), 1f, Color.White, LayerDepth.Text, GameFonts.Lucida, 300, 0.5f ); } ); }
public void Enable () { if (curCamera != null) curCamera.Disable(); curCamera = this; enabled = true; SubmitChange(); }
public DuelGameScreen( IAI TankAI1, IAI TankAI2 ) { BaseGame.CoordinMgr.SetScreenViewRect( scrnViewRect ); camera = new Camera( 2.6f, new Vector2( 150, 112 ), 0 ); camera.maxScale = 4.5f; camera.minScale = 2f; camera.Enable(); InitialBackGround(); sceneMgr = new SceneMgr(); SceneInitial(); GameManager.LoadScene( sceneMgr ); RuleInitial(); AIInitial( TankAI1, TankAI2 ); InitialDrawMgr( TankAI1, TankAI2 ); InitialStartTimer(); }
public ShootTheBallRule() { //BaseGame.ShowMouse = true; BaseGame.CoordinMgr.SetScreenViewRect( scrnViewRect ); camera = new Camera( 4, new Vector2( 100, 75 ), 0 ); camera.maxScale = 4; camera.Enable(); InintialBackGround(); //scene = new SceneKeeperCommon(); sceneMgr = new SceneMgr(); SceneInitial(); GameManager.LoadScene( sceneMgr ); LoadResource(); }