Skip to main content
Anonymous507
Known Participant
April 13, 2014
Question

how to make object available for all MVC classes

  • April 13, 2014
  • 1 reply
  • 345 views

I am converting as3 game into MVC pattern. In my game I have used a object which has game status and full game details. First I thought to keep the game object in model class, so which I can update and access the object. I like to know whether I am going in a right path or is there any better way to do this.

Please tell about your view here.

This topic has been closed for replies.

1 reply

Inspiring
April 14, 2014

"which has game status and full game details"

not really sure what you mean by "full game details", if you mean assets, UI etc, then you split that part away and move it to VIEW and parts of the UI that the user can interact with (usually Buttons and other components) to CONTROLLER

any data belongs into the Model but in general nothing what has a visual represantation.

This is one of the simplest diagrams to look at MVC:

http://en.wikipedia.org/wiki/File:MVC-Process.svg