1
This commit is contained in:
parent
d24f428df0
commit
611785bea4
@ -54,8 +54,10 @@ void BoxDrop::OnObstacleDeadDrop(Obstacle* ob)
|
|||||||
void BoxDrop::Drop(int num, const glm::vec3& center)
|
void BoxDrop::Drop(int num, const glm::vec3& center)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < num; ++i) {
|
for (int i = 0; i < num; ++i) {
|
||||||
//room_->CreateLoot(BOX_ID, center, center, 1, 1);
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
room_->CreateObstacle(BOX_ID, center.x, center.y, center.z);
|
GlmHelper::RotateY(dir, a8::RandAngle());
|
||||||
|
const glm::vec3 pos = center + dir * (25.0f + rand() % 50);
|
||||||
|
room_->CreateObstacle(BOX_ID, pos.x, pos.y, pos.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user