Ignore:
Timestamp:
2010-06-15 15:56:39 (13 years ago)
Author:
ramipasa
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2010/24/ramipasa/ALTKTileEngine/Peli.cs

    r869 r878  
    1919    { 
    2020        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; 
    2628 
    2729        // !!!!!!!!!!!!!!!!!!!!!!!!!!! 
     
    4951        Vector CamSpeedSouth = new Vector(.0, -20.0); 
    5052 
    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ä 
    5354        int MouseScreenWidth; 
    5455        int MouseScreenHeight; 
     
    5758        protected override void Begin() 
    5859        { 
     60            Textpath = Application.StartupPath + "\\Content\\Textures\\"; 
    5961            InitRules(); 
    6062            InitStartMenu(); 
     
    8486                if (a == 7) { SetDiffButton(InsanityButton, 7); } 
    8587            } 
     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); 
    8695        } 
    8796 
     
    8998        { 
    9099            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"); } 
    92108            Add(diffbutton); 
    93109            //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; 
    94120        } 
    95121         
Note: See TracChangeset for help on using the changeset viewer.