source: trunk/orbital/gun.h @ 1416

Last change on this file since 1416 was 1416, checked in by sam, 8 years ago

orbital: parser for the gun commands... fails to link because of flex.

File size: 1.2 KB
Line 
1//
2// Orbital
3//
4// Copyright: (c) 2012 Various People
5//
6
7extern char const *lolfx_shiny;
8
9#if !defined __GUN_H__
10#define __GUN_H__
11
12namespace yy { class GunParser; }
13
14class Gun
15{
16    friend class yy::GunParser;
17
18public:
19    Gun()
20      : m_position(0.f),
21        m_scrz(0.f),
22        m_round_duration(0.2f),
23        m_round_timer(0.f),
24        m_elapsed_time(0.f),
25        m_radius(5.f),
26        m_angle(0.f),
27        m_angle_offset(0.f),
28        m_pre_aim(0.f),
29        m_nbshoots(0),
30        m_shoot_type(0),
31        m_shoot_speed(10.f),
32        m_continuous_aim(false),
33        m_running(false)
34    {}
35
36    void SendCommand(char const *command);
37
38    void Shoot(int count)
39    {
40        float angle = m_angle + m_angle_offset /* FIXME: modifiers */;
41    }
42
43    float AimActor()
44    {
45        return 0.f;
46    }
47
48    void PreAimActor(float time)
49    {
50    }
51
52private:
53    vec3 m_position;
54    float m_scrz;
55    float m_round_duration, m_round_timer, m_elapsed_time;
56    float m_radius, m_angle, m_angle_offset;
57    float m_pre_aim;
58    int m_nbshoots, m_shoot_type;
59    float m_shoot_speed;
60    bool m_continuous_aim, m_running;
61    /* FIXME: angle modifier? */
62};
63
64#endif /* __GUN_H__ */
65
Note: See TracBrowser for help on using the repository browser.