khaledosman / terasoft-summer-reunited

Automatically exported from code.google.com/p/terasoft-summer-reunited
0 stars 0 forks source link

UI1. As a system, I should have a screen manager. #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The screen manager where all other screens get its common attributes from and 
manages listing the screens and which screens comes first, adds new screens to 
display them, freezes / unfreezes a screen, remove a screen, etc...

Original issue reported on code.google.com by khaled.osmaan on 25 Jul 2012 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 25 Jul 2012 at 8:50

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r30.

Added class GameScreen taken from the other summer project which temporarily it 
needs some improvements

Original comment by khaled.osmaan on 2 Aug 2012 at 2:27

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r31.

Added class ScreenManager taken from the other summer project temporarily, it 
needs some improvements

Original comment by khaled.osmaan on 2 Aug 2012 at 2:27

GoogleCodeExporter commented 9 years ago

Original comment by khaled.osmaan on 2 Aug 2012 at 8:49

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r73.

fixed some stuff in the screenManager to integrate the work

Original comment by khaled.osmaan on 3 Aug 2012 at 10:30

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r74.

Added the screenManager and edited Game1 methods to integrate the screenManager 
and show other developers how it works..

Original comment by khaled.osmaan on 3 Aug 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Game Screen: 
1)use getter and setter like  
public ScreenState screenState { get; set; } 
instead of :  
 private ScreenState screenState; 
        public ScreenState ScreenState 
        { 
            get { return screenState; } 
            set { screenState = value; } 
        } 

2)What is the meaning of class abstract and you  

have virtual methods empty ? if you will not 
 implement it then it is abstract ,talking about  

: 
Initialize() ,UnloadContent() 

3)what is meaning of  
            if (IsFrozen) 
                return; ? in update ? in all cases it will return,lol 

4)You have two method one with covered parameter  

and one not,i don't see benefit from this. 

=========== 
ScreenManger  
1)remove unused using stamens. 

2)use getter and setters like :  

public ScreenState screenState { get; set; } 

3)remove braces in  
        foreach (GameScreen screen in screens) 
            { 
                if (!screen.IsFrozen) 
                    screensToUpdate.Add(screen); 
            } 
because this is one statement.

Original comment by hollaxy...@gmail.com on 15 Aug 2012 at 2:33

GoogleCodeExporter commented 9 years ago
1) its the same but ok
2)They might be empty for now but they should be there, as some screens might 
need them, this is an abstract class remember.. not neccessarily all classes 
share the same content in the initialize and unload methods and thats why 
they're empty
3) no this is what causes the screen to freeze it gets it out of the update 
method and thats how the screen freezes since the update method is not called.. 
isFrozen is a flag thats set when you call the freeze screen method
4) yes sorry I forgot to remove it, done

Original comment by khaled.osmaan on 17 Aug 2012 at 9:57