Changeset 8908 for 2017/27/OskariK/OK/OK/OK/OK.cs
- Timestamp:
- 2017-07-05 10:36:24 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2017/27/OskariK/OK/OK/OK/OK.cs
r8895 r8908 33 33 LuoHP(); 34 34 Kontrollit(); 35 35 36 36 37 37 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); … … 89 89 Label foeHP = new Label(); 90 90 91 foeHP.X = 0.00;91 foeHP.X = 150.00; 92 92 foeHP.Y = Screen.Top - 40.00; 93 93 foeHP.TextColor = Color.Red; … … 116 116 { 117 117 if (Pointer.Velocity.Magnitude > 0) return; 118 118 119 119 Vector sijainti = Pointer.Position + nopeus; 120 120 if (sijainti.Y > command.Top) return; … … 154 154 void Attack() 155 155 { 156 goopHP.Value -=10; 157 } 156 goopHP.Value -= 10; 157 158 Hitanim(); 159 } 160 161 void Hitanim() 162 { 163 GameObject hit = new GameObject(100.00, 100.00); 164 hit.Shape = Shape.Star; 165 hit.Color = Color.OrangeRed; 166 hit.X = 0.00; 167 hit.Y = Screen.Top - 60.00; 168 Add(hit, 3); 169 hit.Image = LoadImage("hitanim2"); 170 hit.MaximumLifetime = new TimeSpan(0, 0, 0, 0, 50); 171 172 PlaySound("hit"); 173 174 GameObject hit2 = new GameObject(100.00, 100.00); 175 hit2.Shape = Shape.Star; 176 hit2.Color = Color.OrangeRed; 177 hit2.X = 0.00; 178 hit2.Y = Screen.Top - 60.00; 179 hit2.Image = LoadImage("hitanim"); 180 hit2.MaximumLifetime = new TimeSpan(0, 0, 0, 0, 100); 181 Add(hit2, 3); 182 183 Attackfeed(); 184 } 185 186 void Attackfeed() 187 { 188 GameObject feed2= new GameObject (1000.00, 300.00); 189 feed2.Shape = Shape.Rectangle; 190 feed2.Color = Color.Black; 191 feed2.X = -400.00; 192 feed2.Y = -330.00; 193 feed2.Image = LoadImage("feed2"); 194 Add(feed2); 195 } 196 197 198 199 200 158 201 }
Note: See TracChangeset
for help on using the changeset viewer.