GEJM
1.0.0.0
a 2D platformer made by students
Main Page
Namespaces
Classes
Files
File List
Users
Michał
Desktop
forest_mldp
Projekt
trunk
Trigger.h
1
#ifndef TRIGGER_H
2
#define TRIGGER_H
3
4
#include "Game.h"
5
#include "SolidObject.h"
6
#include <functional>
7
12
class
Trigger
:
13
public
SolidObject
14
{
15
public
:
30
Trigger
(
Game
*
const
gameObject,
31
void
(
Game
::*onTrigger)(),
32
void
(
Game
::*onStartTouch)(),
33
void
(
Game
::*onEndTouch)(),
34
double
x
= 0.0,
35
double
y
= 0.0,
36
double
width
= 3.0,
37
double
height
= 3.0,
38
bool
triggerOnce =
true
);
39
43
~Trigger
();
44
48
void
trigger
();
49
53
void
untrigger
();
54
58
Trigger
&
operator=
(
Trigger
const
&) =
delete
;
59
private
:
63
std::function<void(void)> onTrigger;
64
68
std::function<void(void)> onStartTouch;
69
73
std::function<void(void)> onEndTouch;
74
78
bool
const
triggerOnce;
79
83
bool
isTriggered;
84
};
85
#endif // TRIGGER_H
Object::x
double x
Definition:
Object.h:83
Object::width
double width
Definition:
Object.h:93
Object::height
double height
Definition:
Object.h:98
Object::y
double y
Definition:
Object.h:88
Trigger::~Trigger
~Trigger()
Definition:
Trigger.cpp:48
Trigger::untrigger
void untrigger()
Definition:
Trigger.cpp:79
Trigger::Trigger
Trigger(Game *const gameObject, void(Game::*onTrigger)(), void(Game::*onStartTouch)(), void(Game::*onEndTouch)(), double x=0.0, double y=0.0, double width=3.0, double height=3.0, bool triggerOnce=true)
Definition:
Trigger.cpp:21
SolidObject
Definition:
SolidObject.h:9
Trigger::trigger
void trigger()
Definition:
Trigger.cpp:55
Trigger::operator=
Trigger & operator=(Trigger const &)=delete
Game
Definition:
Game.h:53
Trigger
Definition:
Trigger.h:12
Generated by
1.8.11