mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-25 01:17:10 +01:00
14 lines
252 B
GDScript3
14 lines
252 B
GDScript3
|
extends RigidBody2D
|
||
|
|
||
|
var size : Vector2
|
||
|
|
||
|
func make_room(_pos : Vector2, _size : Vector2):
|
||
|
position = _pos
|
||
|
size = _size
|
||
|
|
||
|
var s : RectangleShape2D = RectangleShape2D.new()
|
||
|
s.custom_solver_bias = 0.75
|
||
|
s.extents = size
|
||
|
|
||
|
$CollisionShape2D.shape = s
|