#include "dxstdafx.h" #include ".\usertriggerreport.h" #include "Scene.h" #include "GameManager.h" #include "UserContactReport.h" #include "Player.h" UserTriggerReport::UserTriggerReport(void) { } UserTriggerReport::~UserTriggerReport(void) { } void UserTriggerReport::setScene(Scene* _scene) { this->scene = _scene; } void UserTriggerReport::onTrigger(NxShape& triggerShape, NxShape& otherShape, NxTriggerFlag status) { if(triggerShape.getGroup() == UserContactReport::COLGROUP_PLAYER && otherShape.getGroup() != UserContactReport::COLGROUP_TERRAIN) { if(status & NX_TRIGGER_ON_ENTER) { if(otherShape.getGroup()==UserContactReport::COLGROUP_GOODIE) { this->scene->setTrigger(GameScene::TRIGGER_GOODIECATCH, (Node*) triggerShape.getActor().userData, (Node*) otherShape.getActor().userData, 0); } } } }