Changeset 4589
- Timestamp:
- 2013-07-23 15:50:47 (10 years ago)
- Location:
- 2013/27/TeemuM
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/27/TeemuM/Game/Game/Game/Game.cs
r4529 r4589 17 17 18 18 public static G game; 19 Image Background = LoadImage("Ground0"); 19 20 private IntMeter scoreboard; 20 21 public Player player { get; private set; } … … 186 187 Keyboard.Listen(Key.Tab, ButtonState.Pressed, DeveloperCommand, null); 187 188 189 Map(); 188 190 player = new Player(this, 50, 50, 10, true); 189 191 player.Dying += GameOver; 190 192 Add(player); 191 Camera.Follow(player);193 //Camera.Follow(player); 192 194 193 195 AddScoreMeter(); … … 297 299 } 298 300 301 public void Map() 302 { 303 Level.Width = Screen.Width; 304 Level.Height = Screen.Height; 305 306 Surfaces levelBorders = Level.CreateBorders(10, 10, 10); 307 levelBorders.Bottom.Color = Color.Aqua; 308 levelBorders.Bottom.IgnoresCollisionResponse = true; 309 levelBorders.Top.Color = Color.Aqua; 310 levelBorders.Top.IgnoresCollisionResponse = true; 311 levelBorders.Left.Color = Color.Aqua; 312 levelBorders.Left.IgnoresCollisionResponse = true; 313 levelBorders.Right.Color = Color.Aqua; 314 levelBorders.Right.IgnoresCollisionResponse = true; 315 316 317 Level.Background.Image = Background; 318 Level.Background.TileToLevel(); 319 Camera.ZoomToLevel(); 320 } 321 299 322 void CreateLifeMeter() 300 323 { … … 315 338 GameObject layer = new GameObject(Game.Screen.Width + 100, Game.Screen.Height + 100); 316 339 layer.Color = Color.Transparent; 317 layer.Position = player.Position;340 layer.Position = Screen.Center; 318 341 Add(layer, 1); 319 342 layer.FadeColorTo(Color.Lerp(Color.Transparent, Color.Black, 0.8), 1.0); 320 343 321 344 GameObject txt = new GameObject(987, 248); 322 txt.Position = player.Position;345 txt.Position = Level.Center; 323 346 txt.Image = LoadImage("GameOverImage"); 324 347 Add(txt, 1); 325 348 326 349 PushButton r = new PushButton("Return to menu"); 327 r.X = player.X;328 r.Y = player.Y - Screen.Height / 4;350 r.X = Level.Center.X; 351 r.Y = Level.Center.Y - Screen.Height / 4; 329 352 r.Clicked += delegate() { MainMenu(); }; 330 353 Add(r, 1); -
2013/27/TeemuM/Game/Game/Game/Game.csproj.Debug.cachefile
r4484 r4589 4 4 Content\Zombie3.xnb 5 5 Content\Zombie4.xnb 6 Content\transparent.xnb 7 Content\GameOverImage.xnb 8 Content\Ground0.xnb 6 9 Content\Background0.xnb 7 10 Content\Background1.xnb … … 10 13 Content\Background4.xnb 11 14 Content\Enemyspawn0.xnb 15 Content\GameOverSound0.xnb 12 16 Content\MenuMusic0.xnb 13 17 Content\Randomsound0.xnb 18 Content\EasterEgg.xnb 14 19 Content\Zombiebite0.xnb 15 20 Content\Zombiesound0.xnb 16 21 Content\Zombiesound1.xnb 17 22 Content\Zombiesound2.xnb 18 Content\transparent.xnb 19 Content\EasterEgg.xnb 20 Content\transparent.xnb 21 Content\GameOverSound0.xnb 22 Content\GameOverImage.xnb 23 Content\Slime.xnb 24 Content\Slime2.xnb 25 Content\Slime3.xnb 26 Content\Slime4.xnb 23 27 Content\Background0.wma 24 28 Content\Background1.wma … … 27 31 Content\Background4.wma 28 32 Content\Enemyspawn0.wma 33 Content\GameOverSound0.wma 29 34 Content\MenuMusic0.wma 30 35 Content\Randomsound0.wma 36 Content\EasterEgg.wma 31 37 Content\Zombiebite0.wma 32 38 Content\Zombiesound0.wma 33 39 Content\Zombiesound1.wma 34 40 Content\Zombiesound2.wma 35 Content\EasterEgg.wma36 Content\GameOverSound0.wma -
2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj
r4484 r4589 160 160 </Compile> 161 161 </ItemGroup> 162 <ItemGroup> 163 <Compile Include="Slime.png"> 164 <Name>Slime</Name> 165 <Importer>TextureImporter</Importer> 166 <Processor>TextureProcessor</Processor> 167 </Compile> 168 <Compile Include="Slime2.png"> 169 <Name>Slime2</Name> 170 <Importer>TextureImporter</Importer> 171 <Processor>TextureProcessor</Processor> 172 </Compile> 173 <Compile Include="Slime3.png"> 174 <Name>Slime3</Name> 175 <Importer>TextureImporter</Importer> 176 <Processor>TextureProcessor</Processor> 177 </Compile> 178 <Compile Include="Slime4.png"> 179 <Name>Slime4</Name> 180 <Importer>TextureImporter</Importer> 181 <Processor>TextureProcessor</Processor> 182 </Compile> 183 </ItemGroup> 184 <ItemGroup> 185 <Compile Include="Ground0.jpg"> 186 <Name>Ground0</Name> 187 <Importer>TextureImporter</Importer> 188 <Processor>TextureProcessor</Processor> 189 </Compile> 190 </ItemGroup> 162 191 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 163 192 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.