source: trunk/mrpigeon/player.h @ 1310

Last change on this file since 1310 was 1310, checked in by sam, 9 years ago

core: tick methods now use seconds, like any sane system.

  • Property svn:keywords set to Id
File size: 968 bytes
Line 
1//
2// MrPigeon
3//
4// Copyright: (c) 2012 Various People
5//
6
7#if !defined __PLAYER_H__
8#define __PLAYER_H__
9
10#include "mrpigeon.h"
11
12class Player : public WorldEntity
13{
14public:
15    Player(MrPigeon *game);
16    virtual ~Player();
17
18    char const *GetName() { return "<player>"; }
19
20    void Action();
21
22protected:
23    virtual void TickGame(float seconds);
24    virtual void TickDraw(float seconds);
25
26    MrPigeon *game;
27
28    TileSet *pigeon_flying;
29    TileSet *player_dashdown,
30            *player_death,
31            *player_fall,
32            *player_jump,
33            *player_kickair,
34            *player_kickfloor,
35            *player_walkb,
36            *player_walk,
37            *player_walkraisefist;
38
39    TileSet *active_set;
40    int active_frame;
41
42    enum {
43       WALKING,
44       FUNKING,
45       KICKFLOOR,
46       FALLING,
47       JUMPING,
48       DASHDOWN,
49       KICKAIR,
50    }
51    state;
52
53    vec3 velocity;
54    float walktime, flytime;
55};
56
57#endif // __PLAYER_H__
58
Note: See TracBrowser for help on using the repository browser.