Changeset 878 for 2010/24/ramipasa/ALTKTileEngine/Peli.cs
- Timestamp:
- 2010-06-15 15:56:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/24/ramipasa/ALTKTileEngine/Peli.cs
r869 r878 19 19 { 20 20 bool gamestarted = false; 21 22 //int[,] MapObjectCoords; 23 int[,] TerrainMap; 24 int[,] DTerrainMap; 25 int[,] OwnershipMap; 21 int currDiffLevel; // jotta tätä voidaan käyttää missä tahansa 22 23 int[,] TerrainMap; // perusmaastokartta 24 int[,] DTerrainMap; // erikoismaastokartta 25 int[,] OwnershipMap; // ruudukon omistuskartta (kenen pelaajan hallinnassa on mikäkin ruutu) 26 27 string Textpath; 26 28 27 29 // !!!!!!!!!!!!!!!!!!!!!!!!!!! … … 49 51 Vector CamSpeedSouth = new Vector(.0, -20.0); 50 52 51 // Käytän ennemmin enemmän RAM-muistia kuin prosessoria, joten lasken nämä jo täällä 52 53 // Käytän ennemmin enemmän muistia kuin prosessoria, joten lasken nämä jo täällä 53 54 int MouseScreenWidth; 54 55 int MouseScreenHeight; … … 57 58 protected override void Begin() 58 59 { 60 Textpath = Application.StartupPath + "\\Content\\Textures\\"; 59 61 InitRules(); 60 62 InitStartMenu(); … … 84 86 if (a == 7) { SetDiffButton(InsanityButton, 7); } 85 87 } 88 Mouse.ListenOn(TrainingButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 1); 89 Mouse.ListenOn(EasyButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 2); 90 Mouse.ListenOn(NormalButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 3); 91 Mouse.ListenOn(HardButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 4); 92 Mouse.ListenOn(VHardButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 5); 93 Mouse.ListenOn(NightmareButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 6); 94 Mouse.ListenOn(InsanityButton, MouseButton.Left, Jypeli.ButtonState.Down, SelectDifficulty, "", 7); 86 95 } 87 96 … … 89 98 { 90 99 diffbutton.X = -250; 91 diffbutton.Y = (difflevel * 50); 100 diffbutton.Y = ((difflevel * -50) + 400); 101 if (difflevel == 1) { diffbutton.Image = LoadImage(Textpath + "training"); } 102 else if (difflevel == 2) { diffbutton.Image = LoadImage(Textpath + "easy"); } 103 else if (difflevel == 3) { diffbutton.Image = LoadImage(Textpath + "normal"); } 104 else if (difflevel == 4) { diffbutton.Image = LoadImage(Textpath + "hard"); } 105 else if (difflevel == 5) { diffbutton.Image = LoadImage(Textpath + "vhard"); } 106 else if (difflevel == 6) { diffbutton.Image = LoadImage(Textpath + "nightmare"); } 107 else if (difflevel == 7) { diffbutton.Image = LoadImage(Textpath + "insanity"); } 92 108 Add(diffbutton); 93 109 //return diffbutton; 110 } 111 112 void SelectDifficulty(int difflevel) 113 { 114 //ClearAll(); 115 currDiffLevel = new int(); 116 currDiffLevel = difflevel; 117 InitControls(); 118 InitMap(); 119 gamestarted = true; 94 120 } 95 121
Note: See TracChangeset
for help on using the changeset viewer.