Changeset 8402
- Timestamp:
- 2017-02-18 14:52:41 (6 years ago)
- Location:
- 2016/koodauskerho/VilleH
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/koodauskerho/VilleH/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/ninjakissanhikileikit.cs
r8376 r8402 9 9 public class Tasohyppelypeli1 : PhysicsGame 10 10 { 11 const double nopeus = 550;12 constdouble hyppyNopeus = 500;11 double nopeus = 650; 12 double hyppyNopeus = 500; 13 13 const int RUUDUN_KOKO = 40; 14 14 … … 92 92 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 93 93 94 Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, - nopeus);95 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus);96 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1 , hyppyNopeus);94 Keyboard.Listen(Key.Left, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -1.0); 95 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, 1.0); 96 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1); 97 97 98 98 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 99 99 100 ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, Liikuta, "Pelaaja liikkuu vasemmalle", pelaaja1, -nopeus); 101 ControllerOne.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 102 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 100 ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, Liikuta, "Pelaaja liikkuu vasemmalle", pelaaja1, -1.0); 101 ControllerOne.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja1, 1.0); 102 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1); 103 Keyboard.Listen(Key.F5, ButtonState.Pressed, Konsoli, ""); 103 104 104 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 105 // Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", pelaajan1Ase); 106 105 107 106 } 108 107 109 void Liikuta(PlatformCharacter hahmo, double nopeus)108 void Konsoli() 110 109 { 111 hahmo.Walk(nopeus); 110 InputWindow kysymysIkkuna = new InputWindow("Konsoli"); 111 kysymysIkkuna.TextEntered += ProcessInput; 112 Add(kysymysIkkuna); 112 113 } 113 114 114 void Hyppaa(PlatformCharacter hahmo, double nopeus)115 void ProcessInput(InputWindow ikkuna) 115 116 { 116 hahmo.Jump(nopeus); 117 string[] vastaus = ikkuna.InputBox.Text.Split(' '); 118 119 if(vastaus[0]=="speed") 120 { 121 nopeus = int.Parse(vastaus[1]); 122 } 123 124 if (vastaus[0] == "gravity") 125 { 126 Gravity =new Vector(0, int.Parse(vastaus[1])); 127 } 128 if (vastaus[0] == "BOING") 129 { 130 hyppyNopeus = int.Parse(vastaus[1]); 131 } 132 if (vastaus[0]=="sanic") 133 { 134 nopeus = 3500; 135 } 136 } 137 138 void Liikuta(PlatformCharacter hahmo, double suunta) 139 { 140 hahmo.Walk(nopeus* suunta); 141 } 142 143 void Hyppaa(PlatformCharacter hahmo) 144 { 145 hahmo.Jump(hyppyNopeus); 117 146 } 118 147 -
2016/koodauskerho/VilleH/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r8376 r8402 8 8 <Processor>SoundEffectProcessor</Processor> 9 9 <Options>None</Options> 10 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\maali.xnb</Output>11 <Time>201 6-12-17T10:27:34.4476585+02:00</Time>10 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\maali.xnb</Output> 11 <Time>2017-02-18T10:36:15.8213537+02:00</Time> 12 12 </Item> 13 13 <Item> … … 17 17 <Processor>TextureProcessor</Processor> 18 18 <Options>None</Options> 19 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\norsu.xnb</Output>20 <Time>201 6-12-17T10:27:34.5568585+02:00</Time>19 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\norsu.xnb</Output> 20 <Time>2017-02-18T10:36:15.9305544+02:00</Time> 21 21 </Item> 22 22 <Item> … … 26 26 <Processor>TextureProcessor</Processor> 27 27 <Options>None</Options> 28 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tahti.xnb</Output>29 <Time>201 6-12-17T10:27:34.6504585+02:00</Time>28 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tahti.xnb</Output> 29 <Time>2017-02-18T10:36:16.0085549+02:00</Time> 30 30 </Item> 31 31 <Item> … … 35 35 <Processor>TextureProcessor</Processor> 36 36 <Options>None</Options> 37 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\piikki.xnb</Output>38 <Time>201 6-12-17T10:27:34.4476585+02:00</Time>37 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\piikki.xnb</Output> 38 <Time>2017-02-18T10:36:15.8213537+02:00</Time> 39 39 </Item> 40 40 <Item> … … 44 44 <Processor>TextureProcessor</Processor> 45 45 <Options>None</Options> 46 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\doritos-nacho-cheese.xnb</Output>47 <Time>201 6-12-17T10:27:34.4632585+02:00</Time>46 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\doritos-nacho-cheese.xnb</Output> 47 <Time>2017-02-18T10:36:15.8369538+02:00</Time> 48 48 </Item> 49 49 <Item> … … 53 53 <Processor>TextureProcessor</Processor> 54 54 <Options>None</Options> 55 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi.xnb</Output>56 <Time>201 6-12-17T10:27:34.4476585+02:00</Time>55 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\tyyppi.xnb</Output> 56 <Time>2017-02-18T10:36:15.8213537+02:00</Time> 57 57 </Item> 58 58 <Item> … … 62 62 <Processor>TextureProcessor</Processor> 63 63 <Options>None</Options> 64 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kissa.xnb</Output>65 <Time>201 6-12-17T10:27:34.6504585+02:00</Time>64 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kissa.xnb</Output> 65 <Time>2017-02-18T10:36:16.024155+02:00</Time> 66 66 </Item> 67 67 <Item> … … 71 71 <Processor>TextFileContentProcessor</Processor> 72 72 <Options>None</Options> 73 <Output>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output>74 <Time>201 6-12-17T13:40:10.124043+02:00</Time>73 <Output>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\kentta1.xnb</Output> 74 <Time>2017-02-18T10:36:15.8369538+02:00</Time> 75 75 </Item> 76 76 <BuildSuccessful>true</BuildSuccessful> … … 81 81 <BuildConfiguration>Debug</BuildConfiguration> 82 82 <CompressContent>false</CompressContent> 83 <RootDirectory>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\TasohyppelypeliContent\</RootDirectory>84 <LoggerRootDirectory>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\</LoggerRootDirectory>85 <IntermediateDirectory>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\obj\x86\Debug\</IntermediateDirectory>86 <OutputDirectory>C:\MyTemp\ villeH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\</OutputDirectory>83 <RootDirectory>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\TasohyppelypeliContent\</RootDirectory> 84 <LoggerRootDirectory>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\</LoggerRootDirectory> 85 <IntermediateDirectory>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\obj\x86\Debug\</IntermediateDirectory> 86 <OutputDirectory>C:\MyTemp\VilleH\Tasohyppelypeli\Tasohyppelypeli\Tasohyppelypeli\bin\x86\Debug\Content\</OutputDirectory> 87 87 </Settings> 88 88 <Assemblies> … … 121 121 <Assembly> 122 122 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 123 <Value>2015-09-16T1 9:52:38.3293055+03:00</Value>123 <Value>2015-09-16T12:26:20.8291525+03:00</Value> 124 124 </Assembly> 125 125 </Assemblies>
Note: See TracChangeset
for help on using the changeset viewer.