Ignore:
Timestamp:
2015-06-30 07:49:44 (4 years ago)
Author:
sieerinn
Message:

Miekan heiluttelu kirjoitettu uusiksi.

File:
1 edited

Legend:

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

    r6548 r6549  
    2222    #region Resources 
    2323 
    24     public static Image gunImage = LoadImage("gun"); 
     24    public static Image GunImage = LoadImage("gun"); 
     25 
     26    public static Image SmallSwordImage = LoadImage("smallsword"); 
    2527 
    2628    [AssetName("walkright")] 
     
    9193        Keyboard.Listen(Key.Down, ButtonState.Down, player.Move, null, Direction.Down); 
    9294 
    93         Keyboard.Listen(Key.Space, ButtonState.Pressed, player.SwingSword, null); 
     95        Keyboard.Listen(Key.Space, ButtonState.Pressed, delegate { if (player.ActiveItem != null) player.ActiveItem.UseKeyPressed(); }, null); 
     96        Keyboard.Listen(Key.Space, ButtonState.Released, delegate { if (player.ActiveItem != null) player.ActiveItem.UseKeyReleased(); }, null); 
     97        Keyboard.Listen(Key.Space, ButtonState.Down, delegate { if (player.ActiveItem != null) player.ActiveItem.UseKeyDown(); }, null); 
    9498 
    9599        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, null); 
Note: See TracChangeset for help on using the changeset viewer.