Changeset 10

Show
Ignore:
Timestamp:
01/26/2012 02:27:10 PM (2 years ago)
Author:
acarter
Message:

Added slider and began traffic game

Location:
Code/oMaE/oMaE
Files:
3 added
4 modified

Legend:

Unmodified
Added
Removed
  • Code/oMaE/oMaE/Game1.cs

    r9 r10  
    2323        GameState gamestate = new GameState(); 
    2424        Match match = new Match(); 
     25        FractionalTraffic traffic = new FractionalTraffic(); 
    2526        public Game1() 
    2627        { 
     
    4041            this.IsMouseVisible = true; 
    4142            match.Initialize(); 
     43            traffic.Initialize(); 
    4244            base.Initialize(); 
    4345        } 
     
    5254            spriteBatch = new SpriteBatch(GraphicsDevice); 
    5355            match.LoadContent(Content); 
     56            traffic.LoadContent(Content); 
    5457            // TODO: use this.Content to load your game content here 
    5558        } 
     
    7679            gamestate.Update(gameTime, Keyboard.GetState(), Mouse.GetState()); 
    7780            // TODO: Add your update logic here 
    78             match.Update(gamestate); 
     81            // match.Update(gamestate); 
     82            traffic.Update(gamestate); 
    7983            base.Update(gameTime); 
    8084        } 
     
    8892            GraphicsDevice.Clear(Color.CornflowerBlue); 
    8993 
    90             match.Draw(spriteBatch, gamestate); 
     94            // match.Draw(spriteBatch, gamestate); 
     95            traffic.Draw(spriteBatch, gamestate); 
    9196            // TODO: Add your drawing code here 
    9297 
  • Code/oMaE/oMaE/GameObject.cs

    r9 r10  
    2626            }  
    2727        } 
    28         static Texture2D Pixel; 
     28        public static Texture2D Pixel; 
    2929        public GameObject() { } 
    3030        public virtual bool Initialize() 
  • Code/oMaE/oMaE/Widgets/RadioButton.cs

    r9 r10  
    2121        public Vector2 Center { get { return new Vector2(Location.Center.X, Location.Center.Y); } } 
    2222 
    23         public static Texture2D UnclickedImg, ClickedImg, Pixel; 
     23        public static Texture2D UnclickedImg, ClickedImg; 
    2424         
    2525        public RadioButton(Rectangle Location, String text, TextLocation textLocation, RadioGroup Parent) 
  • Code/oMaE/oMaE/oMaE.csproj

    r7 r10  
    110110    <Compile Include="GameObject.cs" /> 
    111111    <Compile Include="GameState.cs" /> 
     112    <Compile Include="MiniGames\FractionalTraffic.cs" /> 
    112113    <Compile Include="MiniGames\Match.cs" /> 
    113114    <Compile Include="MiniGames\MousePointer.cs" /> 
     115    <Compile Include="MiniGames\TrafficLight.cs" /> 
    114116    <Compile Include="Properties\AssemblyInfo.cs" /> 
    115117    <Compile Include="Program.cs" /> 
     
    117119    <Compile Include="Widgets\RadioButton.cs" /> 
    118120    <Compile Include="Widgets\RadioGroup.cs" /> 
     121    <Compile Include="Widgets\Slider.cs" /> 
    119122  </ItemGroup> 
    120123  <ItemGroup>