Changeset 7677
- Timestamp:
- 2016-07-04 11:29:04 (7 years ago)
- Location:
- 2016/24/JustusL/Object_Ball/Object_Ball
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/Object_Ball.cs
r7669 r7677 18 18 Image[] painikeKuvat = LoadImages("kaariosa", "kyna", "palikka"); 19 19 20 bool liikkes; 20 21 21 22 Label hiiri; … … 23 24 PhysicsObject maali; 24 25 PhysicsObject tahti; 26 27 GameObject haamu; 25 28 26 29 Timer ajastin; … … 79 82 { 80 83 tyokalu = paikka; 84 85 if (tyokalu == 0 || tyokalu == 2) 86 { 87 if (haamu != null) haamu.Destroy(); 88 haamu = new GameObject(100, 100); 89 Add(haamu); 90 if (tyokalu == 0) haamu.Image = kaarikuva; 91 if (tyokalu == 2) haamu.Color = Color.Black; 92 } 81 93 }; 82 94 … … 97 109 Keyboard.Listen(Key.Enter, ButtonState.Pressed, PalloLiikkeelle, "Start"); 98 110 99 //Keyboard.Listen(Key.Right, ButtonState.Down, MuutaKulmaa, null); 111 Keyboard.Listen(Key.NumPad1, ButtonState.Down, MuutaKulmaa, null, 1); 112 Keyboard.Listen(Key.NumPad3, ButtonState.Down, MuutaKulmaa, null, -1); 113 Keyboard.Listen(Key.Right, ButtonState.Down, MuutaSkaalaa, null, new Vector(1,0)); 114 Keyboard.Listen(Key.Left, ButtonState.Down, MuutaSkaalaa, null, new Vector(-1, 0)); 115 Keyboard.Listen(Key.Up, ButtonState.Down, MuutaSkaalaa, null, new Vector(0, 1)); 116 Keyboard.Listen(Key.Down, ButtonState.Down, MuutaSkaalaa, null, new Vector(0, -1)); 100 117 } 101 118 102 119 void HiiriPainettu() 103 120 { 104 if (tyokalu == 0 )105 { 106 107 PhysicsObject kaari = PhysicsObject.CreateStaticObject( 500, 200);121 if (tyokalu == 0 && !liikkes) 122 { 123 124 PhysicsObject kaari = PhysicsObject.CreateStaticObject(haamu.Width, haamu.Height); 108 125 kaari.Shape = Shape.FromImage(kaarikuva); 109 kaari.Angle = Angle.FromDegrees(160);126 kaari.Angle = haamu.Angle; 110 127 kaari.Image = kaarikuva; 111 128 kaari.Position = Mouse.PositionOnWorld; 112 129 Add(kaari); 113 130 } 114 if (tyokalu == 2 )115 { 116 PhysicsObject kuutio = PhysicsObject.CreateStaticObject( 40, 40);131 if (tyokalu == 2 && !liikkes) 132 { 133 PhysicsObject kuutio = PhysicsObject.CreateStaticObject(haamu.Width, haamu.Height); 117 134 kuutio.Shape = Shape.Rectangle; 135 kuutio.Angle = haamu.Angle; 118 136 kuutio.Color = Color.Black; 119 137 kuutio.Position = Mouse.PositionOnWorld; … … 153 171 } 154 172 155 void MuutaKulmaa( PhysicsObject kappale,int muutos)173 void MuutaKulmaa( int muutos) 156 174 { 157 175 if(tyokalu == 0 || tyokalu == 2) 158 176 { 159 //kappale.Angle += muutos; 177 haamu.Angle += Angle.FromDegrees(muutos); 178 } 179 } 180 void MuutaSkaalaa(Vector skaala) 181 { 182 if (haamu != null) 183 { 184 haamu.Size += skaala; 160 185 } 161 186 } … … 215 240 hiiri.Image = kursori; 216 241 217 Mouse.ListenMovement(0. 1, HiirenSeuraus, null);242 Mouse.ListenMovement(0.0, HiirenSeuraus, null); 218 243 Add(hiiri); 219 244 … … 225 250 hiiri.Position = Mouse.PositionOnScreen; 226 251 Camera.StayInLevel = true; 252 if (haamu != null) 253 { 254 haamu.Position = hiiri.Position; 255 } 256 227 257 } 228 258 void PalloLiikkeelle() … … 233 263 pallo.IgnoresPhysicsLogics = false; 234 264 265 liikkes = true; 266 235 267 ajastin = new Timer(); 236 268 ajastin.Interval = 0.5; … … 242 274 void TarkistaNopeus() 243 275 { 244 if (pallo.Velocity.Magnitude < 0.0 1)276 if (pallo.Velocity.Magnitude < 0.03) 245 277 { 246 278 -
2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/obj/x86/Debug/ContentPipeline-{CD347656-A8F2-48EE-8097-A4F9AF1242F0}.xml
r7370 r7677 8 8 <Processor>TextureProcessor</Processor> 9 9 <Options>None</Options> 10 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output>11 <Time>2016-0 6-16T11:35:20.4922466+03:00</Time>10 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output> 11 <Time>2016-07-04T10:29:37.230784+03:00</Time> 12 12 </Item> 13 13 <Item> … … 17 17 <Processor>TextureProcessor</Processor> 18 18 <Options>None</Options> 19 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output>20 <Time>2016-0 6-16T12:22:54.0854567+03:00</Time>19 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output> 20 <Time>2016-07-04T10:29:37.230784+03:00</Time> 21 21 </Item> 22 22 <Item> … … 26 26 <Processor>TextureProcessor</Processor> 27 27 <Options>None</Options> 28 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output>29 <Time>2016-0 6-16T12:22:55.824712+03:00</Time>28 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output> 29 <Time>2016-07-04T10:29:37.090384+03:00</Time> 30 30 </Item> 31 31 <Item> … … 35 35 <Processor>TextureProcessor</Processor> 36 36 <Options>None</Options> 37 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output>38 <Time>2016-0 6-16T11:35:20.5217772+03:00</Time>37 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output> 38 <Time>2016-07-04T10:29:37.090384+03:00</Time> 39 39 </Item> 40 40 <Item> … … 44 44 <Processor>TextureProcessor</Processor> 45 45 <Options>None</Options> 46 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output>47 <Time>2016-0 6-16T11:35:20.5287781+03:00</Time>46 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output> 47 <Time>2016-07-04T10:29:37.230784+03:00</Time> 48 48 </Item> 49 49 <Item> … … 53 53 <Processor>TextureProcessor</Processor> 54 54 <Options>None</Options> 55 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output>56 <Time>2016-0 6-16T12:22:56.4812302+03:00</Time>55 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output> 56 <Time>2016-07-04T10:29:37.090384+03:00</Time> 57 57 </Item> 58 58 <Item> … … 62 62 <Processor>TextureProcessor</Processor> 63 63 <Options>None</Options> 64 <Output>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output>65 <Time>2016-0 6-16T11:35:20.5417776+03:00</Time>64 <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output> 65 <Time>2016-07-04T10:29:37.105984+03:00</Time> 66 66 </Item> 67 67 <BuildSuccessful>true</BuildSuccessful> … … 72 72 <BuildConfiguration>Debug</BuildConfiguration> 73 73 <CompressContent>false</CompressContent> 74 <RootDirectory>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory>75 <LoggerRootDirectory>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory>76 <IntermediateDirectory>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory>77 <OutputDirectory>C:\ Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory>74 <RootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory> 75 <LoggerRootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory> 76 <IntermediateDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory> 77 <OutputDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory> 78 78 </Settings> 79 79 <Assemblies> 80 80 <Assembly> 81 <Key>C:\ Users\Justus\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key>82 <Value>2015-0 4-01T18:41:16+03:00</Value>81 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 82 <Value>2015-02-09T20:18:44+02:00</Value> 83 83 </Assembly> 84 84 <Assembly> … … 107 107 </Assembly> 108 108 <Assembly> 109 <Key>C:\ Users\Justus\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key>110 <Value>2015-0 4-01T18:41:16+03:00</Value>109 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 110 <Value>2015-02-17T22:27:18+02:00</Value> 111 111 </Assembly> 112 112 <Assembly> 113 <Key>C:\W INDOWS\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key>114 <Value>2015- 12-15T06:54:21.9346879+02:00</Value>113 <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> 114 <Value>2015-09-16T19:42:13.6500946+03:00</Value> 115 115 </Assembly> 116 116 </Assemblies> -
2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/obj/x86/Debug/Object_Ball.csproj.FileListAbsolute.txt
r7370 r7677 29 29 C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Object_Ball.exe 30 30 C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Object_Ball.pdb 31 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb 32 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb 33 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb 34 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb 35 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb 36 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb 37 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb 38 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Object_Ball.exe 39 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Object_Ball.pdb 40 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Jypeli.dll 41 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Jypeli.xml 42 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Object_Ball.csprojResolveAssemblyReference.cache 43 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 44 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Object_Ball.exe 45 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\Object_Ball.pdb -
2016/24/JustusL/Object_Ball/Object_Ball/Object_BallContent/obj/x86/Debug/Object_BallContent.contentproj.FileListAbsolute.txt
r7370 r7677 1 1 C:\Users\Justus\Documents\jypeli\Object_Ball\Object_Ball\Object_BallContent\obj\x86\Debug\Object_BallContent.contentprojResolveAssemblyReference.cache 2 2 C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_BallContent\obj\x86\Debug\Object_BallContent.contentprojResolveAssemblyReference.cache 3 C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_BallContent\obj\x86\Debug\Object_BallContent.contentprojResolveAssemblyReference.cache
Note: See TracChangeset
for help on using the changeset viewer.