From 21bae5f903889d1eb5df1ae4ca4c1d8dd71c9249 Mon Sep 17 00:00:00 2001 From: rafaelbarbsoatec Date: Thu, 26 Oct 2023 10:41:58 -0300 Subject: [PATCH] updade tiled --- v3.0/doc/sensor.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v3.0/doc/sensor.md b/v3.0/doc/sensor.md index c8e95e9..dae101a 100644 --- a/v3.0/doc/sensor.md +++ b/v3.0/doc/sensor.md @@ -29,11 +29,18 @@ class Spikes extends GameDecoration with Sensor { super.onContactExit(component); } +} +``` + + +Automatically the sensor use your component size. If you want use a custom size just add your `ShapeHitbox`: + +```dart + @override Future onLoad() { - add(RectangleHitbox(size:size)); + add(RectangleHitbox(size:Vector2())); return super.onLoad(); } -} ``` \ No newline at end of file