Changeset 6768 for 2015/27


Ignore:
Timestamp:
2015-07-03 08:01:12 (4 years ago)
Author:
sieerinn
Message:

Pientä viimeistelyä vielä.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs

    r6767 r6768  
    192192        ClearAll(); 
    193193        Level.Background.Color = Color.Black; 
     194        MediaPlayer.Stop(); 
    194195 
    195196        var text = new Label("Voitit muutes belin."); // Tekstin voisi vaihtaa. 
     
    367368        Keyboard.Listen(Key.Space, ButtonState.Pressed, CycleItems, null); 
    368369 
     370        Keyboard.Listen(Key.F8, ButtonState.Pressed, GiveAllItems, null); 
    369371        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, null); 
     372    } 
     373 
     374    void GiveAllItems() 
     375    { 
     376        if (player.Inventory.FirstOrDefault(i => i is Pistol) == null) player.Inventory.Add(new Pistol(player)); 
     377        if (player.Inventory.FirstOrDefault(i => i is Grenade) == null) player.Inventory.Add(new Grenade(player)); 
     378        if (player.Inventory.FirstOrDefault(i => i is Mask) == null) player.Inventory.Add(new Mask(player)); 
     379        if (player.Sword == null) player.Sword = new Sword(player); 
     380        UpdateItemCycleImages(); 
    370381    } 
    371382 
Note: See TracChangeset for help on using the changeset viewer.