战斗场景搭建

master
lightyears 2 years ago
parent 3df1b48fea
commit 50b099265d
Signed by: lightyears
GPG Key ID: 98D80DDF26D4F2F9

@ -1,6 +1,6 @@
namespace CMSGame
{
public partial class BattleCharacter : Node2D
public partial class BattleCharacter : CharacterBody3D
{
public BattleFieldPosition BattleFieldPosition;

@ -1,37 +1,30 @@
[gd_scene load_steps=3 format=3]
[gd_scene load_steps=4 format=3 uid="uid://igk5375j1keq"]
[ext_resource type="Texture2D" uid="uid://cnilysgmgw8n4" path="res://Temp/Characters/1_19.png" id="1_o3tjt"]
[ext_resource type="Script" path="res://Models/BattleCharacter.cs" id="2_vbdi8"]
[node name="BattleCharacter" type="Node2D"]
[sub_resource type="BoxShape3D" id="BoxShape3D_r28jb"]
size = Vector3(0.84, 1.46, 0.17)
[node name="BattleCharacter" type="CharacterBody3D"]
script = ExtResource("2_vbdi8")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer3D" parent="."]
unique_name_in_owner = true
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
shaded = true
alpha_cut = 2
texture = ExtResource("1_o3tjt")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Sprite2D"]
unique_name_in_owner = true
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.23, 0)
shape = SubResource("BoxShape3D_r28jb")
[node name="TopStatusLabel" type="Label" parent="."]
[node name="StatusLabel" type="Label3D" parent="."]
unique_name_in_owner = true
offset_left = -64.0
offset_top = -144.0
offset_right = 64.0
offset_bottom = -80.0
text = "状态指示器(上)"
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.72, 0)
text = "状态标签"
vertical_alignment = 2
autowrap_mode = 3
clip_text = true
text_overrun_behavior = 4
[node name="ButtomStatusLabel" type="Label" parent="."]
unique_name_in_owner = true
offset_left = -64.0
offset_top = 64.0
offset_right = 64.0
offset_bottom = 128.0
text = "状态指示器(下)"
autowrap_mode = 3
clip_text = true
text_overrun_behavior = 4

@ -1,7 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://cx6yq8awwkqv3"]
[gd_scene load_steps=10 format=3 uid="uid://cx6yq8awwkqv3"]
[ext_resource type="Script" path="res://Scenes/BattleScene.cs" id="1_n6bn7"]
[ext_resource type="PackedScene" uid="uid://cslqihnfw0me2" path="res://Components/SettingsMenuPopup.tscn" id="2_aucd7"]
[ext_resource type="PackedScene" path="res://Components/SettingsMenuPopup.tscn" id="2_aucd7"]
[ext_resource type="Texture2D" uid="uid://dt1kwicn6i51e" path="res://Temp/Textures/SBS - Tiny Texture Pack - 256x256/256x256/Bricks/Bricks_05-256x256.png" id="3_swgxf"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_vrgig"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
@ -16,7 +17,15 @@ sky = SubResource("Sky_26whx")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="BoxMesh" id="BoxMesh_7g2up"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_udghy"]
albedo_texture = ExtResource("3_swgxf")
uv1_scale = Vector3(20, 20, 20)
[sub_resource type="PlaneMesh" id="PlaneMesh_30sfg"]
material = SubResource("StandardMaterial3D_udghy")
size = Vector2(40, 20)
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_a4f8m"]
[node name="BattleScene" type="Node3D"]
script = ExtResource("1_n6bn7")
@ -25,9 +34,11 @@ script = ExtResource("1_n6bn7")
environment = SubResource("Environment_hv4sx")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.93328, 0.35915, 0, -0.35915, 0.93328, 0, 1.08667, 0)
transform = Transform3D(1, 0, 0, 0, 0.558497, 0.829506, 0, -0.829506, 0.558497, 0, 10.6856, 0)
shadow_enabled = true
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 2.35115, 0)
[node name="CanvasLayer" type="CanvasLayer" parent="Camera3D"]
@ -65,6 +76,7 @@ text = "按下 Space 暂停时间"
[node name="PauseMenuPopup" type="Popup" parent="Camera3D/CanvasLayer/HUD"]
unique_name_in_owner = true
size = Vector2i(242, 306)
borderless = false
[node name="PauseMenu" type="VBoxContainer" parent="Camera3D/CanvasLayer/HUD/PauseMenuPopup"]
anchors_preset = 8
@ -96,15 +108,29 @@ unique_name_in_owner = true
layout_mode = 2
text = "退出战斗"
[node name="SettingsMenuPopup" parent="Camera3D/CanvasLayer/HUD/PauseMenuPopup" instance=ExtResource("2_aucd7")]
[node name="SettingsMenuPopup" parent="Camera3D/CanvasLayer/HUD" instance=ExtResource("2_aucd7")]
unique_name_in_owner = true
visible = false
borderless = false
[node name="Ground" type="Node3D" parent="."]
unique_name_in_owner = true
[node name="Area3D" type="Area3D" parent="Ground"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -10)
mesh = SubResource("PlaneMesh_30sfg")
skeleton = NodePath("../..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -10)
shape = SubResource("WorldBoundaryShape3D_a4f8m")
[node name="Characters" type="Node3D" parent="."]
unique_name_in_owner = true
[node name="MeshInstance3D" type="MeshInstance3D" parent="Characters"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.30333, 0, -2.36628)
mesh = SubResource("BoxMesh_7g2up")
[node name="Objects" type="Node3D" parent="."]
[connection signal="pressed" from="Camera3D/CanvasLayer/HUD/PauseBattleButton" to="." method="On_PauseBattleButton_Pressed"]
[connection signal="popup_hide" from="Camera3D/CanvasLayer/HUD/PauseMenuPopup" to="." method="On_PauseMenuPopup_PopupHide"]

@ -0,0 +1,3 @@
# TODO
- [x] 战斗场景搭建

@ -1,10 +1,9 @@
namespace CMSGame
{
public partial class BattleSceneTest : Node2D
public partial class BattleSceneTest : Node3D
{
public override void _Ready()
{
}
}
}

@ -1,21 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://6phl40durwor"]
[ext_resource type="PackedScene" uid="uid://cx6yq8awwkqv3" path="res://Scenes/BattleScene.tscn" id="1_fdqdi"]
[ext_resource type="Script" path="res://Tests/BattleSceneTest.cs" id="1_tuul4"]
[sub_resource type="CSharpScript" id="CSharpScript_cjbd5"]
script/source = "namespace CMSGame
{
public partial class BattleSceneTest : Node2D
{
public override void _Ready()
{
}
}
}
"
[node name="BattleSceneTest" type="Node2D"]
script = SubResource("CSharpScript_cjbd5")
[node name="BattleSceneTest" type="Node3D"]
script = ExtResource("1_tuul4")
[node name="BattleScene" parent="." instance=ExtResource("1_fdqdi")]

@ -52,3 +52,9 @@ battle_pause={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
[rendering]
anti_aliasing/quality/msaa_2d=1
anti_aliasing/quality/msaa_3d=1
anti_aliasing/quality/screen_space_aa=1

Loading…
Cancel
Save