Changeset 609
- Timestamp:
- 2010-06-09 11:59:33 (13 years ago)
- Location:
- 2010/23/ekeimaja/Labyrinth
- Files:
-
- 2 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/23/ekeimaja/Labyrinth/Labyrinth/Content/Content.contentproj
r593 r609 55 55 <Processor>TextureProcessor</Processor> 56 56 </Compile> 57 <Compile Include="tausta.png">58 <Name>tausta</Name>59 <Importer>TextureImporter</Importer>60 <Processor>TextureProcessor</Processor>61 </Compile>62 57 <Compile Include="wall.png"> 63 58 <Name>wall</Name> … … 66 61 </Compile> 67 62 </ItemGroup> 63 <ItemGroup> 64 <Compile Include="goal.PNG"> 65 <Name>goal</Name> 66 <Importer>TextureImporter</Importer> 67 <Processor>TextureProcessor</Processor> 68 </Compile> 69 </ItemGroup> 68 70 </Project> -
2010/23/ekeimaja/Labyrinth/Labyrinth/Labyrinth.csproj
r593 r609 90 90 <Content Include="Game.ico" /> 91 91 <Content Include="GameThumbnail.png" /> 92 < ContentInclude="kentta1.txt">92 <None Include="kentta1.txt"> 93 93 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 94 </ Content>94 </None> 95 95 <Content Include="monster.png" /> 96 96 <Content Include="player1.png" /> 97 97 <Content Include="player2.png" /> 98 <Content Include="tausta.png" />99 98 </ItemGroup> 100 99 <ItemGroup> -
2010/23/ekeimaja/Labyrinth/Labyrinth/Peli.cs
r593 r609 10 10 public class Peli : Game 11 11 { 12 GameObject Pelaaja1; 13 12 14 const int RuudunLeveys = 50; 13 15 const int RuudunKorkeus = 50; … … 23 25 merkit['0'] = LuoRuoka; 24 26 merkit['1'] = LuoPelaaja1; 25 //merkit['2'] = LuoPelaaja2; 27 merkit['2'] = LuoPelaaja2; 28 merkit['F'] = LuoMaali; 26 29 27 30 char[,] ruudut = Tiles.ReadFromFile("kentta1.txt"); 28 31 29 32 Tiles.Insert(this, ruudut, merkit, RuudunLeveys, RuudunKorkeus); 33 34 LuoOhjain(); 35 30 36 Camera.ZoomToLevel(); 31 37 } … … 33 39 GameObject LuoPelaaja1() 34 40 { 35 GameObjectPelaaja1 = new GameObject(50.0,50.0);41 Pelaaja1 = new GameObject(50.0,50.0); 36 42 Pelaaja1.Image = LoadImage("player1"); 37 43 Add(Pelaaja1); 38 44 return Pelaaja1; 45 46 } 47 48 GameObject LuoPelaaja2() 49 { 50 GameObject Pelaaja2 = new GameObject(50.0, 50.0); 51 Pelaaja2.Image = LoadImage("player2"); 52 Add(Pelaaja2); 53 return Pelaaja2; 39 54 } 40 55 … … 55 70 } 56 71 72 GameObject LuoMaali() 73 { 74 GameObject Maali = new GameObject(50.0, 50.0); 75 Maali.Image = LoadImage("goal"); 76 Add(Maali); 77 return Maali; 78 } 79 57 80 PhysicsObject LuoSeina() 58 81 { … … 63 86 64 87 } 88 void LuoOhjain() 89 { 65 90 66 91 Keyboard.Listen(Key.Left, ButtonState.Down, LiikutaPelaajaaVasemmalle, null); 92 Keyboard.Listen(Key.Right, ButtonState.Down, LiikutaPelaajaaOikealle, null); 93 Keyboard.Listen(Key.Up, ButtonState.Down, LiikutaPelaajaaYlos, null); 94 Keyboard.Listen(Key.Down, ButtonState.Down, LiikutaPelaajaaAlas, null); 95 96 } 67 97 98 99 void LiikutaPelaajaaVasemmalle() 100 { 101 Pelaaja1.Move(new Vector(-20, 0)); 102 } 103 104 void LiikutaPelaajaaOikealle() 105 { 106 Pelaaja1.Move(new Vector(20, 0)); 107 } 108 109 void LiikutaPelaajaaYlos() 110 { 111 Pelaaja1.Move(new Vector(0, -0)); 112 } 113 114 void LiikutaPelaajaaAlas() 115 { 116 Pelaaja1.Move(new Vector(-0, 0)); 117 } 68 118 69 119 } -
2010/23/ekeimaja/Labyrinth/Labyrinth/kentta1.txt
r592 r609 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3 xx 1 x 0 xxx D 0000000 x 4 xx xxxxxx xxxxxxxxxxx xxxxxxxxxxxxxxxx 5 xx x 00000 x 6 xxxxxxxxxxx xxxxxxxxxxxxxx x 00000 x 7 xxxxx 00 x xxx 00000 x x x 8 xx D xx x 9 xxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxx 10 xx D 0 x D x 11 xxxxxxxx xx xxxxxxxxxxxxxxxxxxxxxx x 12 xx 000000 x xx x 13 xxxxxxxxxxx xx xxxxxxxx 000000 x 14 xx xx xxxxxxxx 0000 x 15 xx xxxxxxxxxxxxx 0000000 x 16 xx xxxxxxxxxxxxxxxxx xxx xxxxxxxx 17 xx xxxxxxxxxxxxx F x xxx xxxxxxxx 18 xx 2 xxxxxxxxxxxxx xxxxxxxx 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3 xx 1 x 0 xxx D 0000000 xx 4 xx xxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxxxx 5 xx x xx 6 xxxxxxxxxxxx xxxxxxxxx x x xx 7 xxxxxx 00 x xxxxxxxxx x x 000000 xx 8 xxx D xxxxxxxxx x xx 9 xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xx 10 xx D xx D xx 11 xxxxxxxxx xx xxxxxxxxxxxxxxxxxxxxxx xx 12 xx 000000 x xx 0000000 xx 13 xxxxxxxxxxxx xx 000 xxxxxxxx 000000 xx 14 xx xx xxxxxxxx xx 15 xx xxxxxxxxxxxxx D 000000 xx 16 xx xxxxxxxxxxxxxxxxx xxx xxxxxxxxxxx 17 xx xxxxxxxxxxxxx Fx xxx xxxxxxxxxxx 18 xx 2 xxxxxxxxxxxxx xxxxxxxxxxx 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 21 22 23 24 25
Note: See TracChangeset
for help on using the changeset viewer.