Testing some enemies
This commit is contained in:
@@ -62,11 +62,11 @@ void Scene::debugLine(struct SceneDebugLine line) {
|
||||
}
|
||||
|
||||
void Scene::debugRay(struct SceneDebugRay ray) {
|
||||
this->debugLine((struct SceneDebugLine){
|
||||
.v0 = ray.start,
|
||||
.v1 = ray.start + ray.direction,
|
||||
.color = ray.color
|
||||
});
|
||||
struct SceneDebugLine line;
|
||||
line.v0 = ray.start;
|
||||
line.v1 = ray.start + ray.direction;
|
||||
line.color = ray.color;
|
||||
this->debugLine(line);
|
||||
}
|
||||
|
||||
void Scene::debugCube(struct SceneDebugCube cube) {
|
||||
@@ -154,12 +154,13 @@ void Scene::debugHitboxes() {
|
||||
switch(c->getColliderType()) {
|
||||
case COLLIDER3D_TYPE_CUBE:
|
||||
auto asCube = dynamic_cast<CubeCollider*>(c);
|
||||
this->debugCube((struct SceneDebugCube){
|
||||
.min = asCube->min,
|
||||
.max = asCube->max,
|
||||
.color = COLOR_BLUE,
|
||||
.transform = asCube->transform->getWorldTransform()
|
||||
});
|
||||
struct SceneDebugCube c2;
|
||||
c2.min = asCube->min;
|
||||
c2.max = asCube->max;
|
||||
c2.color = COLOR_BLUE;
|
||||
c2.transform = asCube->transform->getWorldTransform();
|
||||
|
||||
this->debugCube(c2);
|
||||
break;
|
||||
}
|
||||
++itColliders;
|
||||
|
Reference in New Issue
Block a user