- Timestamp:
- 2010-07-28 11:29:07 (13 years ago)
- Location:
- 2010/30/heanjule/Pyromaani
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/30/heanjule/Pyromaani/Peli.cs
r1338 r1352 6 6 public class Peli : PhysicsGame 7 7 { 8 const int ruudunLeveys = 50; 9 const int ruudunKorkeus = 50; 10 8 11 protected override void Begin() 9 12 { 10 13 LuoKentta(); 14 Camera.ZoomToLevel(); 11 15 } 16 17 void LuoKentta() 18 { 19 TileMap taustaruudut = TileMap.FromFile("kenttatausta.txt"); 20 taustaruudut['='] = LuoKuutio; 21 taustaruudut.Insert(ruudunLeveys, ruudunKorkeus); 22 23 24 TileMap ruudut = TileMap.FromFile("kentta.txt"); 25 ruudut['='] = LuoPalikka; 26 ruudut['*'] = LuoAse; 27 ruudut.Insert(ruudunLeveys, ruudunKorkeus); 28 } 29 30 GameObject LuoKuutio() 31 { 32 GameObject kuutio = new GameObject(50, 50, Shapes.Rectangle); 33 kuutio.Color = Color.Blue; 34 return kuutio; 35 } 36 37 PhysicsObject LuoPalikka() 38 { 39 PhysicsObject palikka = PhysicsObject.CreateStaticObject(50.0, 50.0); 40 return palikka; 41 } 42 43 PhysicsObject LuoAse() 44 { 45 PhysicsObject ase = PhysicsObject.CreateStaticObject(20.0, 20.0); 46 return ase; 47 } 48 49 50 51 12 52 } -
2010/30/heanjule/Pyromaani/Pyromaani.csproj
r1334 r1352 89 89 <Content Include="Game.ico" /> 90 90 <Content Include="GameThumbnail.png" /> 91 <Content Include="kentta.txt"> 92 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 93 </Content> 94 <Content Include="kenttatausta.txt"> 95 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 96 </Content> 91 97 </ItemGroup> 92 98 <ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.