Skip to content

Commit

Permalink
updade tiled
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelBarbosatec committed Oct 26, 2023
1 parent 34d594d commit 21bae5f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions v3.0/doc/sensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ class Spikes extends GameDecoration with Sensor<Myplayer> {
super.onContactExit(component);
}
}
```


Automatically the sensor use your component size. If you want use a custom size just add your `ShapeHitbox`:

```dart
@override
Future<void> onLoad() {
add(RectangleHitbox(size:size));
add(RectangleHitbox(size:Vector2()));
return super.onLoad();
}
}
```

0 comments on commit 21bae5f

Please sign in to comment.