- Timestamp:
- 2012-06-15 11:34:16 (11 years ago)
- Location:
- 2012/24/EeroF/LabTank
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/24/EeroF/LabTank/LabTank/LabTank/LabTank.cs
r3034 r3084 9 9 public class LabTank : PhysicsGame 10 10 { 11 const double kaantyy = 2 0;11 const double kaantyy = 2; 12 12 const double nopeus = 500; 13 13 const double hyppyNopeus = 500; … … 18 18 19 19 Image pelaajanKuva = LoadImage("pelaaja"); 20 Image tahtiKuva = LoadImage(" tahti");20 Image tahtiKuva = LoadImage("maalikuva"); 21 21 Image tasonKuva = LoadImage("taso"); 22 22 Image taustanKuva = LoadImage("tausta"); … … 30 30 luoKentta(); 31 31 lisaaNappaimet(); 32 33 Camera.Follow(pelaaja1);34 Camera.ZoomFactor = 1.2;35 Camera.StayInLevel = true;32 Camera.Follow(pelaaja1); 33 Camera.ZoomFactor = 1.2; 34 Camera.StayInLevel = true; 35 36 36 } 37 37 … … 42 42 kentta.SetTileMethod('*', lisaaTahti); 43 43 kentta.SetTileMethod('P', lisaaPelaaja); 44 //kentta.SetTileMethod('A', lisaaMinitorni);44 kentta.SetTileMethod('A', lisaaMinitorni); 45 45 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 46 46 Level.CreateBorders(); … … 53 53 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 54 54 taso.Position = paikka; 55 taso. Color = Color.Green;55 taso.Image = tasonKuva; 56 56 57 57 Add(taso); … … 72 72 pelaaja1 = new PhysicsObject (leveys, korkeus); 73 73 pelaaja1.CanRotate = false; 74 74 pelaaja1.Restitution=0.01; 75 75 pelaaja1.Position = paikka; 76 76 pelaaja1.Mass = 100.0; … … 90 90 Keyboard.Listen(Key.W, ButtonState.Down, hyppaa, "Liikkuu ylös", pelaaja1, hyppyNopeus); 91 91 Keyboard.Listen(Key.S, ButtonState.Down, hyppaa, "Liikkuu alas", pelaaja1, -hyppyNopeus); 92 Keyboard.Listen(Key. Up, ButtonState.Down, kaanna, "Kääntyy", pelaaja1,kaantyy);93 94 92 Keyboard.Listen(Key.Right , ButtonState.Down, kaanna, "Kääntyy", pelaaja1, -kaantyy); 93 Keyboard.Listen(Key.Left, ButtonState.Down, kaanna, "Kääntyy", pelaaja1, kaantyy); 94 //Keyboard.Listen(Key.Space, ButtonState.Down, ammu, "Ampuu", pelaaja1, kaantyy); 95 95 96 96 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 122 122 maaliAani.Play(); 123 123 MessageDisplay.Add("Voitit tason!"); 124 // kohde.Destroy();124 // kohde.Destroy(); 125 125 } 126 126 } 127 127 void lisaaMinitorni (Vector paikka, double y, double x ) 128 128 { 129 129 130 130 } 131 131 void kaanna(PhysicsObject hahmo, double kaantyy) 132 132 { 133 133 hahmo.Angle += Angle.FromDegrees(kaantyy) ; 134 } 135 void ammu (PhysicsObject hahmo) 136 { 137 134 138 } 135 139 140 136 141 } -
2012/24/EeroF/LabTank/LabTank/LabTank/LabTank.csproj.Debug.cachefile
r3034 r3084 8 8 Content\Minitankki.xnb 9 9 Content\Taso.xnb 10 Content\maalikuva.xnb 10 11 Content\kentta1.txt -
2012/24/EeroF/LabTank/LabTank/LabTank/bin/x86/Debug/Content/kentta1.txt
r3034 r3084 1 1 2 2 3 ################################################################################### … … 6 7 ######## # # # 7 8 ######## # # # 8 ######## # 9 ######## # * # # 9 10 ######## # # # 10 11 ######## # # # … … 13 14 ######## # # 14 15 ######## # # 15 ### 16 ### *#### # #16 ######## # # 17 ######## # # 17 18 ######## # # 18 19 ######## # # … … 23 24 ######## ################################################################## # 24 25 ######## # # 25 # ##26 # A # A # 26 27 ########################################################################### ##### 27 28 # # -
2012/24/EeroF/LabTank/LabTank/LabTank/obj/x86/Debug/ContentPipeline-{93849E76-CF87-4581-B77C-74DA2F8B7CEC}.xml
r3034 r3084 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2012-06-1 4T14:36:02.6196895+03:00</Time>38 <Time>2012-06-15T11:17:19.4210677+03:00</Time> 39 39 </Item> 40 40 <Item> … … 82 82 <Output>C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\Taso.xnb</Output> 83 83 <Time>2012-06-14T11:54:10.08295+03:00</Time> 84 </Item> 85 <Item> 86 <Source>maalikuva.png</Source> 87 <Name>maalikuva</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\maalikuva.xnb</Output> 92 <Time>2012-06-15T10:31:44.8691677+03:00</Time> 84 93 </Item> 85 94 <BuildSuccessful>true</BuildSuccessful> -
2012/24/EeroF/LabTank/LabTank/LabTank/obj/x86/Debug/LabTank.csproj.FileListAbsolute.txt
r3034 r3084 17 17 C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\Minitankki.xnb 18 18 C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\Taso.xnb 19 C:\MyTemp\EeroF\LabTank\LabTank\LabTank\bin\x86\Debug\Content\maalikuva.xnb -
2012/24/EeroF/LabTank/LabTank/LabTank/obj/x86/Debug/cachefile-{93849E76-CF87-4581-B77C-74DA2F8B7CEC}-targetpath.txt
r3034 r3084 8 8 Content\Minitankki.xnb 9 9 Content\Taso.xnb 10 Content\maalikuva.xnb 10 11 Content\kentta1.txt -
2012/24/EeroF/LabTank/LabTank/LabTankContent/LabTankContent.contentproj
r3034 r3084 102 102 </Compile> 103 103 </ItemGroup> 104 <ItemGroup> 105 <Compile Include="maalikuva.png"> 106 <Name>maalikuva</Name> 107 <Importer>TextureImporter</Importer> 108 <Processor>TextureProcessor</Processor> 109 </Compile> 110 </ItemGroup> 104 111 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 105 112 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2012/24/EeroF/LabTank/LabTank/LabTankContent/kentta1.txt
r3034 r3084 1 1 2 2 3 ################################################################################### … … 6 7 ######## # # # 7 8 ######## # # # 8 ######## # 9 ######## # * # # 9 10 ######## # # # 10 11 ######## # # # … … 13 14 ######## # # 14 15 ######## # # 15 ### 16 ### *#### # #16 ######## # # 17 ######## # # 17 18 ######## # # 18 19 ######## # # … … 23 24 ######## ################################################################## # 24 25 ######## # # 25 # ##26 # A # A # 26 27 ########################################################################### ##### 27 28 # #
Note: See TracChangeset
for help on using the changeset viewer.