- Timestamp:
- 2017-07-04 14:59:43 (6 years ago)
- Location:
- 2017/27/OskariK
- Files:
-
- 4 added
- 3 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/27/OskariK/OK/OK/OK/OK.cs
r8863 r8895 16 16 PhysicsObject Pointer; 17 17 18 IntMeter goopHP; 19 IntMeter HP; 20 21 Label foeHP; 22 Label playerHP; 23 18 24 Vector nopeusYlos = new Vector(0, 100); 19 25 Vector nopeusAlas = new Vector(0, -100); … … 25 31 LuoAlue(); 26 32 luopelaaja(); 33 LuoHP(); 27 34 Kontrollit(); 35 28 36 29 37 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); … … 58 66 foe = new GameObject(1800.00, 700.00); 59 67 foe.Shape = Shape.Rectangle; 60 foe.Color = Color. Blue;68 foe.Color = Color.Aqua; 61 69 foe.X = -10.00; 62 70 foe.Y = 200.00; 71 foe.Image = LoadImage("köntsä"); 63 72 Add(foe); 64 73 } … … 66 75 PhysicsObject luopelaaja() 67 76 { 68 Pointer = new PhysicsObject (10.0, 10.0);77 Pointer = new PhysicsObject(5.0, 5.0); 69 78 Pointer.Color = Color.White; 70 79 Pointer.X = 190.00; 71 80 Pointer.Y = -220.00; 72 Add(Pointer, 3);81 Add(Pointer, 3); 73 82 return Pointer; 74 }83 } 75 84 85 void LuoHP() 86 { 87 goopHP = new IntMeter(20); 88 89 Label foeHP = new Label(); 90 91 foeHP.X = 0.00; 92 foeHP.Y = Screen.Top - 40.00; 93 foeHP.TextColor = Color.Red; 94 foeHP.Color = Color.Transparent; 95 96 foeHP.BindTo(goopHP); 97 Add(foeHP); 98 99 HP = new IntMeter(60); 100 101 Label playerHP = new Label(); 102 103 playerHP.X = 660.00; 104 playerHP.Y = -200.00; 105 playerHP.TextColor = Color.LightGreen; 106 playerHP.Color = Color.Transparent; 107 108 playerHP.BindTo(HP); 109 Add(playerHP); 110 111 112 113 114 } 76 115 void AsetaNopeus(PhysicsObject Pointer, Vector nopeus) 77 116 { 117 if (Pointer.Velocity.Magnitude > 0) return; 118 78 119 Vector sijainti = Pointer.Position + nopeus; 79 120 if (sijainti.Y > command.Top) return; … … 81 122 82 123 Pointer.MoveTo(Pointer.Position + nopeus, 1000.00); 83 124 84 125 } 85 void Kontrollit 126 void Kontrollit() 86 127 { 87 128 Keyboard.Listen(Key.Down, ButtonState.Pressed, AsetaNopeus, "liikkuu", Pointer, nopeusAlas); … … 97 138 //Keyboard.Listen(Key.Right, ButtonState.Released, AsetaNopeus, null, Pointer, Vector.Zero); 98 139 99 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); } 140 Keyboard.Listen(Key.Z, ButtonState.Pressed, Valitse, null); 141 142 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 143 144 } 145 146 void Valitse() 147 148 { 149 if (Pointer.Y > command.Top - command.Height / 3) Attack(); 150 else if (Pointer.Y < command.Bottom + command.Height / 3) Exit(); 151 else Exit(); 152 } 153 154 void Attack() 155 { 156 goopHP.Value -=10; 157 } 100 158 } -
2017/27/OskariK/OK/OK/OK/OK.csproj.Debug.cachefile
r8863 r8895 1 Content\kikki.xnb2 1 Content\kökkö.xnb 2 Content\köntsÀ.xnb -
2017/27/OskariK/OK/OK/OK/obj/x86/Debug/ContentPipeline-{FF5F8A32-FAE3-40A4-9505-35D2B1C5DB01}.xml
r8863 r8895 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item>5 <Source>kikki.png</Source>6 <Name>kikki</Name>7 <Importer>TextureImporter</Importer>8 <Processor>TextureProcessor</Processor>9 <Options>None</Options>10 <Output>C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kikki.xnb</Output>11 <Time>2017-07-04T11:30:13.5834865+03:00</Time>12 </Item>13 4 <Item> 14 5 <Source>kökkö.png</Source> … … 18 9 <Options>None</Options> 19 10 <Output>C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kökkö.xnb</Output> 20 <Time>2017-07-04T11:40:52.0044288+03:00</Time> 11 <Time>2017-07-04T13:17:10.9950063+03:00</Time> 12 </Item> 13 <Item> 14 <Source>köntsä.png</Source> 15 <Name>köntsä</Name> 16 <Importer>TextureImporter</Importer> 17 <Processor>TextureProcessor</Processor> 18 <Options>None</Options> 19 <Output>C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\köntsä.xnb</Output> 20 <Time>2017-07-04T14:58:35.6859098+03:00</Time> 21 21 </Item> 22 22 <BuildSuccessful>true</BuildSuccessful> -
2017/27/OskariK/OK/OK/OK/obj/x86/Debug/OK.csproj.FileListAbsolute.txt
r8863 r8895 7 7 C:\MyTemp\OskariK\OK\OK\OK\obj\x86\Debug\OK.exe 8 8 C:\MyTemp\OskariK\OK\OK\OK\obj\x86\Debug\OK.pdb 9 C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kikki.xnb10 9 C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\kökkö.xnb 10 C:\MyTemp\OskariK\OK\OK\OK\bin\x86\Debug\Content\köntsÀ.xnb -
2017/27/OskariK/OK/OK/OK/obj/x86/Debug/cachefile-{FF5F8A32-FAE3-40A4-9505-35D2B1C5DB01}-targetpath.txt
r8863 r8895 1 Content\kikki.xnb2 1 Content\kökkö.xnb 2 Content\köntsÀ.xnb -
2017/27/OskariK/OK/OK/OKContent/OKContent.contentproj
r8863 r8895 46 46 </ItemGroup> 47 47 <ItemGroup> 48 <Compile Include="k ikki.png">49 <Name>k ikki</Name>48 <Compile Include="kökkö.png"> 49 <Name>kökkö</Name> 50 50 <Importer>TextureImporter</Importer> 51 51 <Processor>TextureProcessor</Processor> … … 53 53 </ItemGroup> 54 54 <ItemGroup> 55 <Compile Include="kö kkö.png">56 <Name>kö kkö</Name>55 <Compile Include="köntsä.png"> 56 <Name>köntsä</Name> 57 57 <Importer>TextureImporter</Importer> 58 58 <Processor>TextureProcessor</Processor>
Note: See TracChangeset
for help on using the changeset viewer.