Changeset 3307 for 2012/26/EliasY
- Timestamp:
- 2012-06-28 11:05:04 (9 years ago)
- Location:
- 2012/26/EliasY/test1
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/26/EliasY/test1/test1/test1/bin/x86/Debug/kentta.txt
r3290 r3307 24 24 = = 25 25 = = 26 = z 26 = zam = 27 27 = = 28 28 = = -
2012/26/EliasY/test1/test1/test1/kentta.txt
r3290 r3307 24 24 = = 25 25 = = 26 = z 26 = zam = 27 27 = = 28 28 = = -
2012/26/EliasY/test1/test1/test1/obj/x86/Debug/ContentPipeline-{BFB255A8-81A7-4A34-AF08-16AEFBF6C543}.xml
r3290 r3307 74 74 <Time>2012-06-27T13:17:09.281798+03:00</Time> 75 75 </Item> 76 <Item> 77 <Source>ammobox.png</Source> 78 <Name>ammobox</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\ammobox.xnb</Output> 83 <Time>2012-06-28T10:54:17.6882473+03:00</Time> 84 </Item> 85 <Item> 86 <Source>medikit.png</Source> 87 <Name>medikit</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\medikit.xnb</Output> 92 <Time>2012-06-28T10:40:12.8144202+03:00</Time> 93 </Item> 76 94 <BuildSuccessful>true</BuildSuccessful> 77 95 <Settings> -
2012/26/EliasY/test1/test1/test1/obj/x86/Debug/test1.csproj.FileListAbsolute.txt
r3290 r3307 16 16 C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\pelaaja_2.xnb 17 17 C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\ase.xnb 18 C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\ammobox.xnb 19 C:\MyTemp\EliasY\test1\test1\test1\bin\x86\Debug\Content\medikit.xnb -
2012/26/EliasY/test1/test1/test1/test1.cs
r3290 r3307 28 28 /*todo: 29 29 * aseet 30 * medikit 31 * ammo 30 32 * vihut 31 33 * mapin parantelu … … 43 45 void AsetaOhjaimet() 44 46 { 45 Keyboard.Listen(Key.W, ButtonState.Down, Liiku, null, 0.0, 45.0);46 Keyboard.Listen(Key.A, ButtonState.Down, Liiku, null, -45.0, 0.0);47 Keyboard.Listen(Key.S, ButtonState.Down, Liiku, null, 0.0, -45.0);48 Keyboard.Listen(Key.D, ButtonState.Down, Liiku, null, 4 5.0, 0.0);47 Keyboard.Listen(Key.W, ButtonState.Down, Liiku, null, 1); 48 Keyboard.Listen(Key.A, ButtonState.Down, Liiku, null, 2); 49 Keyboard.Listen(Key.S, ButtonState.Down, Liiku, null, 3); 50 Keyboard.Listen(Key.D, ButtonState.Down, Liiku, null, 4); 49 51 50 52 Keyboard.Listen(Key.Left, ButtonState.Down, Kaanny, null, 2.0); … … 88 90 } 89 91 90 void Liiku(double x, double y) 91 { 92 Vector pulssi = new Vector(x, y); 93 pelaaja.Velocity = pulssi; 92 void Liiku(int nappain) 93 { 94 Vector pulssi; 95 switch (nappain) 96 { 97 case 1: 98 pulssi = Vector.FromLengthAndAngle(30, pelaaja.Angle); 99 pelaaja.Velocity = pulssi; 100 break; 101 case 2: 102 pulssi = Vector.FromLengthAndAngle(30, pelaaja.Angle + Angle.RightAngle); 103 pelaaja.Velocity = pulssi; 104 break; 105 case 3: 106 pulssi = Vector.FromLengthAndAngle(30, pelaaja.Angle - Angle.StraightAngle); 107 pelaaja.Velocity = pulssi; 108 break; 109 case 4: 110 pulssi = Vector.FromLengthAndAngle(30, pelaaja.Angle - Angle.RightAngle); 111 pelaaja.Velocity = pulssi; 112 break; 113 } 94 114 } 95 115 … … 134 154 void LuoKentta() 135 155 { 156 //avain, konepistooli, portti, maali 136 157 Level.BackgroundColor = Color.DarkBrown; 137 //Level.Background.Image = LoadImage("lattia");138 //Level.Background.TextureWrapSize = new Vector(100, 100);139 //Level.Background.FitToLevel();140 // TODO: taustakuva pelin pohjaksi141 158 TileMap ruudut = TileMap.FromFile("kentta.txt"); 142 159 ruudut['='] = LuoSeina; 143 160 ruudut['z'] = LuoZombi; 161 ruudut['a'] = LuoAmmoBox; 162 ruudut['m'] = LuoMedikit; 144 163 ruudut.Insert(ruudunLeveys, ruudunKorkeus); 164 } 165 166 PhysicsObject LuoAmmoBox() 167 { 168 PhysicsObject ammobox = PhysicsObject.CreateStaticObject(40.0, 30.0); 169 ammobox.Image = LoadImage("ammobox"); 170 AddCollisionHandler(pelaaja, ammobox, delegate { ammobox.Destroy(); kivaari.Ammo.AddValue(50); }); 171 return ammobox; 172 } 173 174 PhysicsObject LuoMedikit() 175 { 176 PhysicsObject medikit = PhysicsObject.CreateStaticObject(40.0, 30.0); 177 medikit.Image = LoadImage("medikit"); 178 AddCollisionHandler(pelaaja, medikit, delegate { medikit.Destroy(); pelaajanterveys.Value = 5; }); 179 return medikit; 145 180 } 146 181 -
2012/26/EliasY/test1/test1/test1/test1.csproj.Debug.cachefile
r3290 r3307 7 7 Content\pelaaja_2.xnb 8 8 Content\ase.xnb 9 Content\ammobox.xnb 10 Content\medikit.xnb 9 11 kentta.txt -
2012/26/EliasY/test1/test1/test1Content/test1Content.contentproj
r3290 r3307 96 96 </Compile> 97 97 </ItemGroup> 98 <ItemGroup> 99 <Compile Include="ammobox.png"> 100 <Name>ammobox</Name> 101 <Importer>TextureImporter</Importer> 102 <Processor>TextureProcessor</Processor> 103 </Compile> 104 <Compile Include="medikit.png"> 105 <Name>medikit</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 </Compile> 109 </ItemGroup> 98 110 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 99 111 <!-- 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.