Changeset 8879 for 2017/27


Ignore:
Timestamp:
2017-07-04 14:07:52 (2 years ago)
Author:
npo17_52
Message:
 
Location:
2017/27/EetuS/Miinaharava
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • 2017/27/EetuS/Miinaharava/Miinaharava.sln

    r8861 r8879  
    66Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Miinaharava", "Miinaharava\Miinaharava\Miinaharava.csproj", "{559C4A9C-DF37-400D-BAD0-AA228E663F90}" 
    77EndProject 
    8 Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "MiinaharavaContent", "Miinaharava\MiinaharavaContent\MiinaharavaContent.contentproj", "{82FC0885-7555-4E9C-A218-A6519B6E8710}" 
     8Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiinaharavaContent", "Miinaharava\MiinaharavaContent\MiinaharavaContent.contentproj", "{82FC0885-7555-4E9C-A218-A6519B6E8710}" 
    99EndProject 
    1010Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{461913F2-6CDE-400B-B47E-21AD84D23B26}" 
    1111        ProjectSection(SolutionItems) = preProject 
     12                ..\lippu.png = ..\lippu.png 
    1213                taso.txt = taso.txt 
    1314        EndProjectSection 
  • 2017/27/EetuS/Miinaharava/Miinaharava/Miinaharava/Miinaharava.cs

    r8877 r8879  
    1010{ 
    1111    List<Laatta> laattalista = new List<Laatta>(); 
    12  
     12    Image lippu = LoadImage("lippu"); 
    1313 
    1414    public override void Begin() 
    1515    { 
    16          
     16 
    1717        Level.Background.Color = Color.AshGray; 
    18        // Image LipunKuva = AsetaLippu("lippu"); 
     18        // Image LipunKuva = AsetaLippu("lippu"); 
     19        ohjaa(); 
    1920    } 
    2021    void Avaa() 
     
    2425 
    2526    } 
    26     
     27 
    2728    void LuoTaso(double leveys, double korkeus) 
    2829    { 
    2930        RandomGen.NextInt(5); 
    3031        TileMap ruudut = TileMap.FromLevelAsset("taso.txt"); 
    31        // ruudut.SetTileMethod('=', LuoTyhja); 
     32        // ruudut.SetTileMethod('=', LuoTyhja); 
    3233        ruudut.SetTileMethod('*', LuoMiina); 
    3334 
     
    4748 
    4849    } 
    49         void ohjaa() 
     50    void ohjaa() 
    5051    { 
    51           //  Mouse.Listen(MouseButton.Left, ButtonState.Pressed, AvaaLuukku, "avaa luukun"); 
    52             Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    53            // Mouse.Listen(MouseButton.Right, ButtonState.Pressed, AsetaLippu, "asettaa lipun ruutuun"); 
    54             Mouse.IsCursorVisible = true; 
     52        //Mouse.Listen(MouseButton.Left, ButtonState.Pressed, AvaaLuukku, "avaa luukun"); 
     53        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     54        Mouse.Listen(MouseButton.Right, ButtonState.Pressed, AsetaLippu, "asettaa lipun ruutuun"); 
     55        Mouse.IsCursorVisible = true; 
     56    } 
     57 
     58    void AsetaLippu() 
     59    { 
     60        double lahinetaisyys = double.MaxValue; 
     61        Laatta laatta = laattalista [0]; 
     62        for (int i = 0; i < laattalista.Count; i++) 
     63        { 
     64            if ((laattalista[i].Position - Mouse.PositionOnWorld).Magnitude < lahinetaisyys) laatta = laattalista[i]; 
    5565        } 
     66        laatta.Image = lippu;  
    5667 
    57        /* void AsetaLippu(); 
    58         { 
     68    } 
    5969 
    6070 
     71} 
     72class Laatta : GameObject 
     73{ 
     74    bool Pommi = false; 
    6175 
    62         } 
    63         */ 
    64  
    65     } 
    66     class Laatta : GameObject 
     76    public Laatta(double leveys, double korkeus) 
     77        : base(leveys, korkeus) 
    6778    { 
    68         bool Pommi = false; 
    69  
    70         public Laatta(double leveys, double korkeus) 
    71             : base(leveys, korkeus) 
    72         { 
    7379 
    7480 
    7581 
    7682 
    77         } 
     83    } 
    7884 
    79      
     85 
    8086} 
  • 2017/27/EetuS/Miinaharava/Miinaharava/Miinaharava/Miinaharava.csproj.Debug.cachefile

    r8861 r8879  
     1Content\lippu.xnb 
    12taso.txt 
  • 2017/27/EetuS/Miinaharava/Miinaharava/Miinaharava/obj/x86/Debug/ContentPipeline-{82FC0885-7555-4E9C-A218-A6519B6E8710}.xml

    r8861 r8879  
    22<XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 
    33  <Asset Type="Pipeline:BuildItemCollection"> 
     4    <Item> 
     5      <Source>lippu.png</Source> 
     6      <Name>lippu</Name> 
     7      <Importer>TextureImporter</Importer> 
     8      <Processor>TextureProcessor</Processor> 
     9      <Options>None</Options> 
     10      <Output>C:\MyTemp\EetuS\Miinaharava\Miinaharava\Miinaharava\bin\x86\Debug\Content\lippu.xnb</Output> 
     11      <Time>2017-07-04T13:55:14.320144+03:00</Time> 
     12    </Item> 
    413    <BuildSuccessful>true</BuildSuccessful> 
    514    <Settings> 
     
    1625    <Assemblies> 
    1726      <Assembly> 
     27        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     28        <Value>2015-02-09T20:18:44+02:00</Value> 
     29      </Assembly> 
     30      <Assembly> 
     31        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 
     32        <Value>2011-09-01T16:22:30+03:00</Value> 
     33      </Assembly> 
     34      <Assembly> 
     35        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 
     36        <Value>2011-09-01T16:22:30+03:00</Value> 
     37      </Assembly> 
     38      <Assembly> 
     39        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 
     40        <Value>2011-09-01T16:22:30+03:00</Value> 
     41      </Assembly> 
     42      <Assembly> 
     43        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 
     44        <Value>2011-09-01T16:22:30+03:00</Value> 
     45      </Assembly> 
     46      <Assembly> 
     47        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 
     48        <Value>2011-09-01T16:22:30+03:00</Value> 
     49      </Assembly> 
     50      <Assembly> 
     51        <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 
     52        <Value>2011-09-01T16:22:30+03:00</Value> 
     53      </Assembly> 
     54      <Assembly> 
     55        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     56        <Value>2015-02-17T22:27:18+02:00</Value> 
     57      </Assembly> 
     58      <Assembly> 
    1859        <Key>C:\WINDOWS\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    19         <Value>2017-06-08T18:20:14.6175359+03:00</Value> 
     60        <Value>2017-06-08T12:22:35.7570973+03:00</Value> 
    2061      </Assembly> 
    2162    </Assemblies> 
  • 2017/27/EetuS/Miinaharava/Miinaharava/Miinaharava/obj/x86/Debug/Miinaharava.csproj.FileListAbsolute.txt

    r8861 r8879  
    88C:\MyTemp\EetuS\Miinaharava\Miinaharava\Miinaharava\obj\x86\Debug\Miinaharava.pdb 
    99C:\MyTemp\EetuS\Miinaharava\Miinaharava\Miinaharava\bin\x86\Debug\taso.txt 
     10C:\MyTemp\EetuS\Miinaharava\Miinaharava\Miinaharava\bin\x86\Debug\Content\lippu.xnb 
  • 2017/27/EetuS/Miinaharava/Miinaharava/MiinaharavaContent/MiinaharavaContent.contentproj

    r8861 r8879  
    4545    <Reference Include="AnimationExtension" /> 
    4646  </ItemGroup> 
     47  <ItemGroup> 
     48    <Compile Include="lippu.png"> 
     49      <Name>lippu</Name> 
     50      <Importer>TextureImporter</Importer> 
     51      <Processor>TextureProcessor</Processor> 
     52    </Compile> 
     53  </ItemGroup> 
    4754  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    4855  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
Note: See TracChangeset for help on using the changeset viewer.