public AnimatedModel(Model newModel) { Model = newModel; SetupModel(); cameraManager = (CameraManager)ScreenManager.Game.Services.GetService(typeof(CameraManager)); }
/// <summary> /// Sets up default camera information /// </summary> protected void SetupCamera() { cameraManager = (CameraManager)ScreenManager.Game.Services.GetService(typeof(CameraManager)); view = cameraManager.ViewMatrix; if (glow == true) { this.startGlowScale = scale; this.endGlowScale = scale - 0.6f; this.currentGlowScale = scale; } }
/// <summary> /// Loads All Game Related Content /// </summary> public override void LoadContent() { //camera = new CollisionCameraObserver( // new Vector3(100.0f, 40.0f, 100.0f), // new Vector3(0.0f, 0.0f, 0.0f), // 45, // ScreenManager.GraphicsDeviceManager.GraphicsDevice.Viewport.Width / ScreenManager.GraphicsDeviceManager.GraphicsDevice.Viewport.Height, // 10); cameraManager = new CameraManager(ScreenManager.GraphicsDeviceManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDeviceManager.GraphicsDevice.Viewport.Height); cameraManager.SetPosition(new Vector3(100.0f, 40.0f, 100.0f)); cameraManager.SetLookAtPoint(new Vector3(0.0f, 0.0f, 0.0f)); ScreenManager.Game.Services.AddService(typeof(CameraManager), cameraManager); #if WINDOWS_PHONE thumbsticks = new VirtualThumbsticks(); #endif SetupLevel(); SetupObjects(); SetupKeyboard(); player = new AnimatedModel(ScreenManager.Game.Content.Load<Model>(@"Player\dude")); }