Changeset 6272 for 2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora.cs
- Timestamp:
- 2015-06-24 15:14:15 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora.cs
r6249 r6272 24 24 PlatformCharacter taistelija; 25 25 26 int kenttaNro = 1;26 int kenttaNro = 2; 27 27 28 28 /// <summary> 29 29 /// Viimeisen pelissä olevan kentän indeksi. 30 30 /// </summary> 31 const int VIIMEINEN_KENTTA = 9;31 const int VIIMEINEN_KENTTA = 15; 32 32 33 33 public override void Begin() … … 192 192 } 193 193 194 void LuoChromaCase() 195 { 196 Mouse.IsCursorVisible = true; 197 198 List<GameObject> pItems = new List<GameObject>(); 199 200 for (int i = 0; i < 40; i++) 201 { 202 GameObject obj = new GameObject(50, 50); 203 obj.Color = RandomGen.NextColor(); 204 obj.Tag = 50.0; 205 pItems.Add(obj); 206 } 207 208 GameObject cCaseDialog = new GameObject(LoadImage("laatikko_opening")); // koko debug 209 Add(cCaseDialog); 210 211 Mouse.ListenOn(cCaseDialog, MouseButton.Left, ButtonState.Pressed, delegate 212 { 213 cCaseDialog.Destroy(); 214 215 GameObject cCaseFront = new GameObject(200.0, 200.0); 216 cCaseFront.Color = new Color(0, 64, 0, 32); 217 218 ChromaCase cCase = new ChromaCase(pItems, cCaseFront, null, 20); 219 cCase.Add(Vector.Zero, 2); 220 cCase.ItemReceived += GotItemFromCase; 221 cCase.Start(); 222 223 }, null); 224 } 225 226 void GotItemFromCase(GameObject o) 227 { 228 229 } 230 194 231 /// <summary> 195 232 /// Asetetaan pelaajalle ohjaimet. … … 201 238 Keyboard.Listen(Key.Space, ButtonState.Pressed, LiikutaYlos, null, taistelija); 202 239 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 240 241 #if DEBUG 242 Keyboard.Listen(Key.C, ButtonState.Pressed, LuoChromaCase, null); 243 #endif 203 244 } 204 245
Note: See TracChangeset
for help on using the changeset viewer.