altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
trigger.h
Go to the documentation of this file.
1
#include "
include.h
"
2
3
#ifndef TRIGGER_H
4
#define TRIGGER_H
5
6
class
Trigger
7
{
8
public
:
9
Trigger
(
Entity
*
entity
,
Audio
&audio);
10
~Trigger
();
11
void
create_sources
(
Audio
&audio);
12
void
destroy
(
Audio
&audio);
13
Entity
*
entity
;
14
15
bool
noise
;
16
17
char
noise_str
[128];
18
unsigned
int
pickup_index
;
19
unsigned
int
respawn_index
;
20
unsigned
int
explode_index
;
21
unsigned
int
idle_index
;
22
23
24
char
action
[
LINE_SIZE
];
25
char
message
[
LINE_SIZE
];
26
float
radius
;
27
int
source
;
28
int
loop_source
;
29
unsigned
int
pickup_buf
;
30
unsigned
int
respawn_buf
;
31
32
bool
hide
;
// whether it should disappear when active
33
bool
active
;
// active when picked up
34
bool
played
;
35
bool
client_active
;
// client side pickup registration (to prevent repeatedly picking something up client side)
36
bool
health
;
// For health items, prevents giving over 100
37
bool
armor
;
// For armor items, prevents giving over 200
38
float
timeout
;
// Timeout between pickups respawning
39
float
timeout_value
;
40
41
42
// I should probably split item pickups from projectiles as it's starting to get complex
43
#if 0
44
bool
projectile;
45
int
explode_type;
// type of explosion sprite
46
vec3
explode_color;
47
float
explode_intensity;
48
unsigned
int
explode_timer;
// How long an explosion lasts (light effect, damage trigger time)
49
unsigned
int
idle_timer;
// How long after stopping something sits before exploding (should probaably be from when fired)
50
unsigned
int
splash_damage;
// Damage given when exploding
51
float
splash_radius;
// Trigger pickup radius when exploding
52
float
knockback;
// Amount to knock people back when exploding (scaled by radius)
53
bool
idle;
// Delete when it stops moving
54
bool
explode;
// Does it explode
55
int
owner;
56
unsigned
int
num_bounce;
57
#endif
58
};
59
60
#endif
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2