Changeset 6088 for 2015/24/ohjaajat


Ignore:
Timestamp:
2015-06-15 01:02:33 (4 years ago)
Author:
sieerinn
Message:

Pimeyttä alkuvalikkoon.

Location:
2015/24/ohjaajat/Dungeon/Dungeon
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/Dungeon.cs

    r6087 r6088  
    251251    public override void Begin() 
    252252    { 
     253        SmoothTextures = false; 
    253254        IsMouseVisible = true; 
    254255        SetWindowSize(1024, 768); 
  • 2015/24/ohjaajat/Dungeon/Dungeon/Dungeon/MainMenu.cs

    r6087 r6088  
    88using Jypeli.Controls; 
    99using Jypeli.Widgets; 
     10using Microsoft.Xna.Framework; 
     11using Color = Jypeli.Color; 
     12using Game = Jypeli.Game; 
    1013 
    1114 
     
    1821    private Image aukkoPohjaKuva = Game.LoadImage("aukko"); 
    1922    private Image aukkoKuva = Game.LoadImage("aukko2"); 
     23    private Image otsikkoKuva = Game.LoadImage("title"); 
     24    private Image pimeysKuva = Game.LoadImage("pimeys"); 
    2025 
    2126    private GameObject pala; // Putoava palkki. 
     
    101106        aukkoValo.Position = pohjaAukko.Position; 
    102107        peli.Add(aukkoValo, 1); 
     108 
     109        double w = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Width, 0)).X; 
     110        double h = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Height)).Y; 
     111        var pimeys = new GameObject(w, h); 
     112        pimeys.Image = pimeysKuva; 
     113        peli.Add(pimeys, 1); 
     114 
     115        var otsikko = new GameObject(400, 100); 
     116        otsikko.Image = otsikkoKuva; 
     117        otsikko.Right = peli.Camera.ScreenToWorld(new Vector(Game.Screen.Right, 0)).X; 
     118        otsikko.Top = peli.Camera.ScreenToWorld(new Vector(0, Game.Screen.Top - ratas.Height)).Y; 
     119        peli.Add(otsikko, 3); 
    103120    } 
    104121 
  • 2015/24/ohjaajat/Dungeon/Dungeon/DungeonContent/DungeonContent.contentproj

    r6087 r6088  
    266266    </Compile> 
    267267  </ItemGroup> 
     268  <ItemGroup> 
     269    <Compile Include="title.png"> 
     270      <Name>title</Name> 
     271      <Importer>TextureImporter</Importer> 
     272      <Processor>TextureProcessor</Processor> 
     273    </Compile> 
     274  </ItemGroup> 
     275  <ItemGroup> 
     276    <Compile Include="pimeys.png"> 
     277      <Name>pimeys</Name> 
     278      <Importer>TextureImporter</Importer> 
     279      <Processor>TextureProcessor</Processor> 
     280    </Compile> 
     281  </ItemGroup> 
    268282  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    269283  <!--  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.