public SpriteController(ViewForm _gameForm, MenuForm _menuForm, GameOver _gameOver, RankMenu _rankMenu, User user, List <Item> itemList, List <Obstacle> obstacleList) { this._gameForm = _gameForm; this._menuForm = _menuForm; this._gameOver = _gameOver; this._rankMenu = _rankMenu; this.user = user; this.itemList = itemList; this.obstacleList = obstacleList; _gameForm.SetController(this); }
}//생성자 public void GameStartFunc() { user = new User(new PictureBox(), Image.FromFile("user.gif"), "user", new Point(380, 260), new Size(50, 60)); _gameForm = new ViewForm(); _gameForm.Controls.Add(user.Sprite_Picture); _gameOver = new GameOver(); _gameOver.SetController(this); itemList = new List <Item>(); obstacleList = new List <Obstacle>(); _gameController = new SpriteController(_gameForm, _menuForm, _gameOver, _rankMenu, user, itemList, obstacleList); _menuForm.Visible = false; _gameForm.Show(); }