broken_seals/game/dungeon_generator/Room.gd

14 lines
252 B
GDScript3
Raw Normal View History

2019-11-20 13:59:32 +01:00
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