Changeset 8008


Ignore:
Timestamp:
2016-07-07 23:08:38 (3 years ago)
Author:
tesatapa
Message:

musiikkia ja menu

Location:
2016/27/ohjaajat/VenienteFragore/VenienteFragore
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/VenienteFragore.cs

    r8007 r8008  
    2727        private readonly Image advenbCrouch = LoadImage("advenbcrouch"); 
    2828 
     29 
    2930        // Lista kenttien nimistä, joista aluksen osa on kerätty. 
    3031        private string currentLevelName; 
     
    4849        public override void Begin() 
    4950        { 
     51 
     52            IsMouseVisible = true; 
     53            Level.Background.CreateGradient(Color.DarkBlue, Color.Black); 
     54 
     55            Label title = new Label(Screen.Width * 0.65, Screen.Height *0.25); 
     56            title.Position = new Vector(0, Screen.Top - Screen.Height * 0.15); 
     57            title.Text = "Veniente Fragore"; 
     58            title.TextScale = new Vector(Screen.Width * 0.004, Screen.Height * 0.003); 
     59            title.TextColor = new Color(50, 25, 100); 
     60            title.HorizontalAlignment = HorizontalAlignment.Left; 
     61            Add(title); 
     62 
     63            PushButton start = new PushButton(Screen.Width * 0.15, Screen.Height * 0.1); 
     64            start.Position = new Vector(0, Screen.Top - Screen.Height * 0.45); 
     65            start.Text = "Start game"; 
     66            start.Color = Color.DarkBlue; 
     67            start.Clicked += StartGame; 
     68 
     69            Add(start); 
     70 
     71            PushButton exit = new PushButton(Screen.Width * 0.15, Screen.Height * 0.1); 
     72            exit.Position = new Vector(0, Screen.Top - Screen.Height * 0.65); 
     73            exit.Text = "Exit"; 
     74            exit.Color = Color.DarkBlue; 
     75            exit.Clicked += Exit; 
     76 
     77            Add(exit); 
     78            Keyboard.Listen(Key.Enter, ButtonState.Pressed, StartGame, null); 
     79            Keyboard.Listen(Key.Space, ButtonState.Pressed, StartGame, null); 
     80 
     81            Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, null); 
     82 
     83            Label credits = new Label(@"Music by DST: http://dreade.com/nosoap/"); 
     84            credits.Position = new Vector(0, Screen.Top - Screen.Height * 0.9); 
     85            Add(credits); 
     86 
     87 
     88        } 
     89 
     90 
     91        private void StartGame() 
     92        { 
     93            ClearAll(); 
     94            MediaPlayer.Volume = 0.35; 
     95            MediaPlayer.Play("DST-PhaserSwitch"); 
     96 
     97            IsMouseVisible = false; 
    5098            lives = new IntMeter(3, 0, 99); 
    51           
     99 
    52100 
    53101            pointsCounter = new DoubleMeter(0, 0, 1000000); 
     
    55103 
    56104            StartLevel("thehub"); 
    57             CreateGUI(); 
     105         
    58106 
    59107            Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
     
    166214            Camera.Position = advenae[0].Position; 
    167215            CameraInitialization(); 
     216 
     217            CreateGUI(); 
    168218        } 
    169219 
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragoreContent/VenienteFragoreContent.contentproj

    r7999 r8008  
    692692    </Compile> 
    693693  </ItemGroup> 
     694  <ItemGroup> 
     695    <Compile Include="DST-PhaserSwitch.mp3"> 
     696      <Name>DST-PhaserSwitch</Name> 
     697      <Importer>Mp3Importer</Importer> 
     698      <Processor>SongProcessor</Processor> 
     699    </Compile> 
     700  </ItemGroup> 
    694701  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    695702  <!--  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.