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_width=1920
|
||||||
window/size/viewport_height=1080
|
window/size/viewport_height=1080
|
||||||
|
window/size/mode=3
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ debug_path_custom_color = Color(1, 0, 0, 1)
|
|||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 1.06581e-14, 0, 1, 0, -1.06581e-14, 0, 1, 0, 0, 0)
|
transform = Transform3D(1, 0, 1.06581e-14, 0, 1, 0, -1.06581e-14, 0, 1, 0, 0, 0)
|
||||||
shape = SubResource("CapsuleShape3D_p0yqe")
|
shape = SubResource("CapsuleShape3D_p0yqe")
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[node name="DetectionSphere" type="Area3D" parent="."]
|
[node name="DetectionSphere" type="Area3D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -10,24 +10,25 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
custom_minimum_size = Vector2(600, 600)
|
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = -1
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = 643.0
|
grow_horizontal = 2
|
||||||
offset_top = 265.0
|
grow_vertical = 2
|
||||||
offset_right = -677.0
|
|
||||||
offset_bottom = -215.0
|
|
||||||
|
|
||||||
[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
|
transparent_bg = true
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
size = Vector2i(600, 600)
|
size = Vector2i(600, 600)
|
||||||
render_target_update_mode = 4
|
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)
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -1.75903, 28.9504, 0)
|
||||||
cull_mask = 1048574
|
cull_mask = 1048574
|
||||||
fov = 120.0
|
fov = 120.0
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace GameJamDungeon
|
|||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||||
|
SwordSlashAnimation.Position = GetViewport().GetVisibleRect().Size / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Setup()
|
public void Setup()
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ _data = {
|
|||||||
"attack": SubResource("Animation_0jjwv")
|
"attack": SubResource("Animation_0jjwv")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_wedu3"]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ywvvo"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_ywvvo"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
@@ -105,8 +107,6 @@ animations = [{
|
|||||||
"speed": 12.0
|
"speed": 12.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wedu3"]
|
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody3D"]
|
[node name="Player" type="CharacterBody3D"]
|
||||||
collision_layer = 38
|
collision_layer = 38
|
||||||
collision_mask = 7
|
collision_mask = 7
|
||||||
@@ -137,13 +137,6 @@ libraries = {
|
|||||||
"": SubResource("AnimationLibrary_w8l8m")
|
"": 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="."]
|
[node name="Area3D" type="Area3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1)
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
@@ -153,3 +146,9 @@ collision_mask = 16
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
shape = SubResource("BoxShape3D_wedu3")
|
shape = SubResource("BoxShape3D_wedu3")
|
||||||
disabled = true
|
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