void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<Actors.Player>();
     startRotation = new Quaternion(0, 0, 0, 1);
     endRotation = new Quaternion(0, 0, 0, 1);
     startRotation.SetEulerAngles(0, 0, 0);
     endRotation.SetEulerAngles(0, 1, 0);
 }
Exemplo n.º 2
0
        public GameScene(GraphicsDevice graphicsDevice, ContentManager content, TileMap tileMap, Vector2 sceneryOffSet)
        {
            this.graphicsDevice = graphicsDevice;
            this.sceneryOffSet  = sceneryOffSet;
            cameraManager       = new CameraManager();
            camera              = new Camera(Vector2.Zero, new Vector2(this.Width, this.Height), new Vector2(50000, 50000));
            this.tileMap        = tileMap;
            this.tileMap.Camera = camera;

            player = new Actors.Player(tileMap, camera, new Vector2(-100, -100), content.Load <Texture2D>(@"Textures/player"), 350.0f, 16, 16, 16, 16);
            cameraManager.SetCameraScript(new ChasingCamera(player.location, camera, 6.0f));
            cameraManager.AddCameraHandler(new Rotater(0.0f, MathHelper.PiOver2, 8));
            cameraManager.AddCameraHandler(new Zoomer(1.0f, 1.0f, 0.5f, 0.01f));

            UpdateRenderTarget();
            this.sceneryOffSet = sceneryOffSet;
            PuzzleEngineAlpha.Resolution.ResolutionHandler.Changed += ResetSizes;
            this.tileMap.NewMap += NewMapHandling;
        }