示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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 );
                } );
        }
示例#4
0
        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();
        }