Changeset 878 for 2010/24


Ignore:
Timestamp:
2010-06-15 15:56:39 (9 years ago)
Author:
ramipasa
Message:
 
Location:
2010/24/ramipasa/ALTKTileEngine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2010/24/ramipasa/ALTKTileEngine/Content/Content.contentproj

    r869 r878  
    4040      <Importer>XImporter</Importer> 
    4141    </Content> 
     42    <Compile Include="Textures\easy.png"> 
     43      <Name>easy</Name> 
     44      <Importer>TextureImporter</Importer> 
     45      <Processor>TextureProcessor</Processor> 
     46      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     47    </Compile> 
     48    <Compile Include="Textures\hard.png"> 
     49      <Name>hard</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     53    </Compile> 
     54    <Compile Include="Textures\Insanity.png"> 
     55      <Name>Insanity</Name> 
     56      <Importer>TextureImporter</Importer> 
     57      <Processor>TextureProcessor</Processor> 
     58      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     59    </Compile> 
     60    <Compile Include="Textures\nightmare.png"> 
     61      <Name>nightmare</Name> 
     62      <Importer>TextureImporter</Importer> 
     63      <Processor>TextureProcessor</Processor> 
     64      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     65    </Compile> 
     66    <Compile Include="Textures\vHard.png"> 
     67      <Name>vHard</Name> 
     68      <Importer>TextureImporter</Importer> 
     69      <Processor>TextureProcessor</Processor> 
     70      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     71    </Compile> 
     72    <Compile Include="Textures\training.png"> 
     73      <Name>training</Name> 
     74      <Importer>TextureImporter</Importer> 
     75      <Processor>TextureProcessor</Processor> 
     76      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     77    </Compile> 
     78    <Compile Include="Textures\normal.png"> 
     79      <Name>normal</Name> 
     80      <Importer>TextureImporter</Importer> 
     81      <Processor>TextureProcessor</Processor> 
     82      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
     83    </Compile> 
    4284    <Compile Include="Textures\cityancientTundra.png"> 
    4385      <Name>cityancientTundra</Name> 
  • 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.