diff --git a/game/entities/Balloon.tsx b/game/entities/Balloon.tsx index 8d47399..d5b248e 100644 --- a/game/entities/Balloon.tsx +++ b/game/entities/Balloon.tsx @@ -27,14 +27,16 @@ const Balloon = ({ body, color }: any) => { }; export default ( + label: string, world: Matter.Composite, color: ColorValue, pos: Position2D, size: Size2D ) => { const body = Matter.Bodies.circle(pos.x, pos.y, 50, { - label: "Balloon", + label, isStatic: false, + id: 5, // restitution: 0.4, // friction: 1, frictionAir: 0.5, diff --git a/game/entities/Wall.tsx b/game/entities/Wall.tsx index 131094a..9adff87 100644 --- a/game/entities/Wall.tsx +++ b/game/entities/Wall.tsx @@ -23,14 +23,14 @@ const Wall = ({ body, color }: any) => { ) } -export default (world: Matter.Composite, color: ColorValue, pos: Position2D, size: Size2D) => { +export default (label: string, world: Matter.Composite, color: ColorValue, pos: Position2D, size: Size2D) => { const body = Matter.Bodies.rectangle( pos.x, pos.y, size.width, size.height, { - label: 'Wall', + label, isStatic: true } as Matter.IChamferableBodyDefinition )