Support different resolutions
This commit is contained in:
@@ -18,6 +18,7 @@ config/features=PackedStringArray("4.4", "C#", "GL Compatibility")
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/size/mode=3
|
||||
|
||||
[dotnet]
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@ debug_path_custom_color = Color(1, 0, 0, 1)
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 1.06581e-14, 0, 1, 0, -1.06581e-14, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("CapsuleShape3D_p0yqe")
|
||||
disabled = true
|
||||
|
||||
[node name="DetectionSphere" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -10,24 +10,25 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||
custom_minimum_size = Vector2(600, 600)
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 643.0
|
||||
offset_top = 265.0
|
||||
offset_right = -677.0
|
||||
offset_bottom = -215.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer"]
|
||||
custom_minimum_size = Vector2(600, 600)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="CenterContainer/SubViewportContainer"]
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(600, 600)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Minimap Camera" type="Camera3D" parent="SubViewportContainer/SubViewport"]
|
||||
[node name="Minimap Camera" type="Camera3D" parent="CenterContainer/SubViewportContainer/SubViewport"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.75903, 28.9504, 0)
|
||||
cull_mask = 1048574
|
||||
fov = 120.0
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace GameJamDungeon
|
||||
public void Initialize()
|
||||
{
|
||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||
SwordSlashAnimation.Position = GetViewport().GetVisibleRect().Size / 2;
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
|
||||
@@ -73,6 +73,8 @@ _data = {
|
||||
"attack": SubResource("Animation_0jjwv")
|
||||
}
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wedu3"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ywvvo"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
@@ -105,8 +107,6 @@ animations = [{
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wedu3"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
collision_layer = 38
|
||||
collision_mask = 7
|
||||
@@ -137,13 +137,6 @@ libraries = {
|
||||
"": SubResource("AnimationLibrary_w8l8m")
|
||||
}
|
||||
|
||||
[node name="SwordSlashAnimation" type="AnimatedSprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(911, 546)
|
||||
scale = Vector2(9.03192, 6.39623)
|
||||
sprite_frames = SubResource("SpriteFrames_ywvvo")
|
||||
animation = &"attack"
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1)
|
||||
collision_layer = 16
|
||||
@@ -153,3 +146,9 @@ collision_mask = 16
|
||||
unique_name_in_owner = true
|
||||
shape = SubResource("BoxShape3D_wedu3")
|
||||
disabled = true
|
||||
|
||||
[node name="SwordSlashAnimation" type="AnimatedSprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
scale = Vector2(9.03192, 6.39623)
|
||||
sprite_frames = SubResource("SpriteFrames_ywvvo")
|
||||
animation = &"attack"
|
||||
|
||||
Reference in New Issue
Block a user