Skip to content

Commit

Permalink
fix seikin
Browse files Browse the repository at this point in the history
  • Loading branch information
yamader committed Dec 29, 2023
1 parent 6335934 commit 8b46007
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/engine/components/BoxCollider.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class BoxCollider: Component, Collider {
}

override void setup() {
if(!parent.has!Transform) return;
auto trf = parent.component!Transform;
if(!go.parent.has!Transform) return;
auto trf = go.parent.component!Transform;
this.size = trf.scale;
}

override void loop() {
if(!parent.has!Transform || constable) return;
auto trf = parent.component!Transform;
if(!go.parent.has!Transform || constable) return;
auto trf = go.parent.component!Transform;
this.size = trf.scale;
}

Expand Down
6 changes: 3 additions & 3 deletions src/game/entities/Block.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class Block: GameObject {

Vec2 size = Vec2(1, 1);
Vec2 v = Vec2(0, 0);

override void setup() {
register(new Transform(Org.World));
register(new Transform(Transform.Org.World));
register(new RigidBody(1)).a = Vec2(0, 0);
register(new BoxCollider);

Expand Down Expand Up @@ -48,5 +48,5 @@ class Block: GameObject {
// }
// }

override
// override
}

0 comments on commit 8b46007

Please sign in to comment.