Revision 1378,
853 bytes
checked in by giegl, 18 years ago
(diff) |
GTPD - Jungle Rumble - integrate into GTP SVN structure
|
Rev | Line | |
---|
[1378] | 1 | #include "dxstdafx.h"
|
---|
| 2 | #include ".\usertriggerreport.h"
|
---|
| 3 | #include "Scene.h"
|
---|
| 4 | #include "GameManager.h"
|
---|
| 5 | #include "UserContactReport.h"
|
---|
| 6 | #include "Player.h"
|
---|
| 7 |
|
---|
| 8 | UserTriggerReport::UserTriggerReport(void)
|
---|
| 9 | {
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | UserTriggerReport::~UserTriggerReport(void)
|
---|
| 13 | {
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | void UserTriggerReport::setScene(Scene* _scene)
|
---|
| 17 | {
|
---|
| 18 | this->scene = _scene;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | void UserTriggerReport::onTrigger(NxShape& triggerShape, NxShape& otherShape, NxTriggerFlag status)
|
---|
| 22 | {
|
---|
| 23 | if(triggerShape.getGroup() == UserContactReport::COLGROUP_PLAYER && otherShape.getGroup() != UserContactReport::COLGROUP_TERRAIN) {
|
---|
| 24 | if(status & NX_TRIGGER_ON_ENTER) {
|
---|
| 25 | if(otherShape.getGroup()==UserContactReport::COLGROUP_GOODIE) {
|
---|
| 26 | this->scene->setTrigger(GameScene::TRIGGER_GOODIECATCH, (Node*) triggerShape.getActor().userData, (Node*) otherShape.getActor().userData, 0);
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.