Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Patrick Boenzli |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION_REACTION |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | #include "collision.h" |
---|
21 | #include "cr_defs.h" |
---|
22 | |
---|
23 | #include "cr_engine.h" |
---|
24 | |
---|
25 | using namespace std; |
---|
26 | |
---|
27 | |
---|
28 | /** |
---|
29 | * standard constructor |
---|
30 | */ |
---|
31 | CREngine::CREngine () |
---|
32 | : BaseObject() |
---|
33 | { |
---|
34 | this->setClassID(CL_CR_ENGINE, "CREngine"); |
---|
35 | this->setName("CREngine"); |
---|
36 | |
---|
37 | this->init(); |
---|
38 | } |
---|
39 | |
---|
40 | /** |
---|
41 | * the singleton reference to this class |
---|
42 | */ |
---|
43 | CREngine* CREngine::singletonRef = NULL; |
---|
44 | |
---|
45 | /** |
---|
46 | @brief standard deconstructor |
---|
47 | */ |
---|
48 | CREngine::~CREngine () |
---|
49 | { |
---|
50 | CREngine::singletonRef = NULL; |
---|
51 | } |
---|
52 | |
---|
53 | |
---|
54 | void CREngine::init() |
---|
55 | { |
---|
56 | // create a list of Collision events (precaching) |
---|
57 | Collision* collisions = new Collision[CR_MAX_COLLISIONS]; |
---|
58 | for( int i = 0; i < CR_MAX_COLLISIONS; i++) |
---|
59 | this->cachedCollisions.push_back(collisions[i]); |
---|
60 | } |
---|
61 | |
---|
62 | |
---|
63 | void CREngine::reset() |
---|
64 | {} |
---|
65 | |
---|
66 | |
---|
67 | /** |
---|
68 | * subscribes a WorldEntity for a CollisionReaction |
---|
69 | * @param owner: the WE to subscribe |
---|
70 | * @param type: the type of collision reaction to perform |
---|
71 | */ |
---|
72 | CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type) |
---|
73 | { |
---|
74 | |
---|
75 | } |
---|
76 | |
---|
77 | bool CREngine::unsubscribeReaction(WorldEntity* worldEntity) |
---|
78 | {} |
---|
79 | |
---|
80 | |
---|
81 | bool CREngine::unsubscribeReaction(CollisionHandle* collisionHandle) |
---|
82 | {} |
---|
83 | |
---|
84 | |
---|
85 | void CREngine::handleCollisions() |
---|
86 | {} |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | void CREngine::debug() |
---|
91 | { |
---|
92 | |
---|
93 | } |
---|
94 | |
---|
Note: See
TracBrowser
for help on using the repository browser.