source: trunk/orbital/gun.h @ 1424

Last change on this file since 1424 was 1424, checked in by sam, 11 years ago

orbital: port the gun command compiler to our bison/flex system.

File size: 1.2 KB
Line 
1//
2// Orbital
3//
4// Copyright: (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
5//            (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
6//            (c) 2012 Sam Hocevar <sam@hocevar.net>
7//
8
9#if !defined __GUN_H__
10#define __GUN_H__
11
12class Gun
13{
14public:
15    Gun()
16      : m_position(0.f),
17        m_scrz(0.f),
18        m_round_duration(0.2f),
19        m_round_timer(0.f),
20        m_elapsed_time(0.f),
21        m_radius(5.f),
22        m_angle(0.f),
23        m_angle_offset(0.f),
24        m_pre_aim(0.f),
25        m_nbshoots(0),
26        m_shoot_type(0),
27        m_shoot_speed(10.f),
28        m_continuous_aim(false),
29        m_running(false)
30    {}
31
32    void SendCommand(char const *command);
33
34    void Shoot(int count)
35    {
36        float angle = m_angle + m_angle_offset /* FIXME: modifiers */;
37    }
38
39    float AimActor()
40    {
41        return 0.f;
42    }
43
44    void PreAimActor(float time)
45    {
46    }
47
48    vec3 m_position;
49    float m_scrz;
50    float m_round_duration, m_round_timer, m_elapsed_time;
51    float m_radius, m_angle, m_angle_offset;
52    float m_pre_aim;
53    int m_nbshoots, m_shoot_type;
54    float m_shoot_speed;
55    bool m_continuous_aim, m_running;
56    /* FIXME: angle modifier? */
57};
58
59#endif /* __GUN_H__ */
60
Note: See TracBrowser for help on using the repository browser.