public CubeController(Cube cube, CubeUndoStack undoStack) { _cube = cube; _undoStack = undoStack; cube.OnMove(cubeMoved); State = ControllerState.Ready; }
protected override void LoadContent() { _spriteBatch = new SpriteBatch(GraphicsDevice); _font = Content.Load <SpriteFont>("Consolas"); _camera = new Camera(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height) { Position = new Vector3(0, 0.5f, -7f) }; _cube = CubeFactory.Create(GraphicsDevice, Content); _undoStack = new CubeUndoStack(_cube); _cube.OnMove(_undoStack.RegisterMove); _cubeController = new CubeController(_cube, _undoStack); }