source: 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/Player.cs @ 6549

Revision 6549, 789 bytes checked in by sieerinn, 4 years ago (diff)

Miekan heiluttelu kirjoitettu uusiksi.

Line 
1using System.Collections.Generic;
2using Jypeli;
3
4class Player : Creature
5{
6    public Dictionary<Direction, Animation> SwingAnimations { get; set; }
7
8    public Item ActiveItem { get; set; }
9
10    public Player()
11        : base(TheLegendOfGabriel.TILE_SIZE, TheLegendOfGabriel.TILE_SIZE)
12    {
13        SwingAnimations = new Dictionary<Direction, Animation>();
14        CollisionIgnoreGroup = 1;
15    }
16
17    protected override void UpdateAnimations()
18    {
19        if (!(ActiveItem != null && ActiveItem.OverrideAnimation))
20        {
21            base.UpdateAnimations();   
22        }
23    }
24
25    public override void UpdateCreature(Time time)
26    {
27        if (ActiveItem != null)
28            ActiveItem.UpdateItem(time);
29        base.UpdateCreature(time);
30    }
31}
Note: See TracBrowser for help on using the repository browser.