add loop size to room config
This commit is contained in:
parent
c16ec316a8
commit
7d6e5321fa
2 changed files with 16 additions and 4 deletions
|
|
@ -1,8 +1,14 @@
|
|||
class_name RoomConfig extends Resource
|
||||
|
||||
|
||||
#@export var size: Vector2i = Vector2i.ZERO
|
||||
@export_group('Camera')
|
||||
## Whether the camera will (initially) follow the player ot not.
|
||||
@export var follow_player: bool = true
|
||||
@export var loopable: bool = false
|
||||
|
||||
## Initial position of the camera.
|
||||
@export var camera_position: Vector2i = Vector2i.ZERO
|
||||
|
||||
@export_group('Room Loop')
|
||||
## Whether the room loops itself or not.
|
||||
@export var loopable: bool = false
|
||||
## Section of the room that will loop itself.
|
||||
@export var loop_size: Rect2i = Rect2i(Vector2i.ZERO, Vector2i.ZERO)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dcecget4734ra"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dcecget4734ra"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bxhyxox662buj" path="res://scenes/room/room.tscn" id="1_tbqj1"]
|
||||
[ext_resource type="Script" uid="uid://bamoq5wi0lkdy" path="res://scenes/room/room_config.gd" id="2_06s2n"]
|
||||
[ext_resource type="Texture2D" uid="uid://cl3pdverm8pok" path="res://assets/yuki.png" id="3_06s2n"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_t5fpq"]
|
||||
script = ExtResource("2_06s2n")
|
||||
|
|
@ -9,3 +10,8 @@ metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
|||
|
||||
[node name="Room" instance=ExtResource("1_tbqj1")]
|
||||
config = SubResource("Resource_t5fpq")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." index="2"]
|
||||
position = Vector2(232, 144)
|
||||
texture = ExtResource("3_06s2n")
|
||||
offset = Vector2(0, -50)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue