1 Star 0 Fork 24

WU小雨/godot-mota

forked from freewu32/godot-mota 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Main.tscn 15.43 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
[gd_scene load_steps=41 format=2]
[ext_resource path="res://src/levels/Level1.tscn" type="PackedScene" id=1]
[ext_resource path="res://src/utils/TouchScrollContainer.gd" type="Script" id=2]
[ext_resource path="res://assets/fonts/Droid Sans Fallback.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://assets/images/winskin.png" type="Texture" id=4]
[ext_resource path="res://assets/sounds/bgm.ogg" type="AudioStream" id=5]
[ext_resource path="res://assets/images/ground.png" type="Texture" id=6]
[ext_resource path="res://assets/images/icons_old.png" type="Texture" id=7]
[ext_resource path="res://assets/fonts/Droid Sans Fallback.tres" type="DynamicFont" id=8]
[ext_resource path="res://src/hud/FlyDialog.gd" type="Script" id=9]
[ext_resource path="res://src/level/LevelsManager.gd" type="Script" id=10]
[ext_resource path="res://src/hud/HUD.gd" type="Script" id=11]
[ext_resource path="res://Main.gd" type="Script" id=12]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 7 )
region = Rect2( 0, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 7 )
region = Rect2( 0, 96, 32, 32 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 7 )
region = Rect2( 0, 128, 32, 32 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 7 )
region = Rect2( 0, 160, 32, 32 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 7 )
region = Rect2( 0, 224, 32, 32 )
[sub_resource type="StreamTexture" id=6]
load_path = "res://.import/icons_old.png-15488db7964fa7b4e69cdc7d96c7bd7f.stex"
[sub_resource type="AtlasTexture" id=7]
atlas = SubResource( 6 )
region = Rect2( 0, 320, 32, 32 )
[sub_resource type="AtlasTexture" id=8]
atlas = SubResource( 6 )
region = Rect2( 0, 352, 32, 32 )
[sub_resource type="AtlasTexture" id=9]
atlas = SubResource( 6 )
region = Rect2( 0, 384, 32, 32 )
[sub_resource type="AtlasTexture" id=10]
atlas = SubResource( 6 )
region = Rect2( 0, 544, 32, 32 )
[sub_resource type="AtlasTexture" id=11]
atlas = SubResource( 6 )
region = Rect2( 0, 448, 32, 32 )
[sub_resource type="AtlasTexture" id=12]
atlas = SubResource( 6 )
region = Rect2( 0, 480, 32, 32 )
[sub_resource type="AtlasTexture" id=13]
atlas = SubResource( 6 )
region = Rect2( 0, 512, 32, 32 )
[sub_resource type="AtlasTexture" id=14]
atlas = SubResource( 6 )
region = Rect2( 0, 544, 32, 32 )
[sub_resource type="StyleBoxEmpty" id=15]
[sub_resource type="StyleBoxEmpty" id=16]
[sub_resource type="StyleBoxEmpty" id=17]
[sub_resource type="StyleBoxEmpty" id=18]
[sub_resource type="StyleBoxEmpty" id=19]
[sub_resource type="DynamicFont" id=20]
size = 32
font_data = ExtResource( 3 )
[sub_resource type="StreamTexture" id=21]
load_path = "res://.import/winskin.png-148a2ef6406d211f02ea143438de6aef.stex"
[sub_resource type="AtlasTexture" id=22]
atlas = SubResource( 21 )
region = Rect2( 152, 16, 16, 8 )
[sub_resource type="AtlasTexture" id=23]
atlas = ExtResource( 4 )
region = Rect2( 152, 40, 16, 8 )
[sub_resource type="StyleBoxEmpty" id=24]
[sub_resource type="StyleBoxEmpty" id=25]
[sub_resource type="StyleBoxEmpty" id=26]
[sub_resource type="StyleBoxEmpty" id=27]
[sub_resource type="StyleBoxEmpty" id=28]
[node name="Main" type="Node2D"]
script = ExtResource( 12 )
[node name="HUD" type="CanvasLayer" parent="."]
script = ExtResource( 11 )
[node name="HeaderBackground" type="TextureRect" parent="HUD"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -207.0
margin_right = 207.0
margin_bottom = 96.0
texture = ExtResource( 6 )
stretch_mode = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="HUD/HeaderBackground"]
margin_left = 16.0
margin_top = 14.0
margin_right = 398.0
margin_bottom = 46.0
columns = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Location" type="TextureRect" parent="HUD/HeaderBackground/GridContainer"]
margin_right = 32.0
margin_bottom = 32.0
texture = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LevelLabel" type="Label" parent="HUD/HeaderBackground/GridContainer"]
margin_left = 40.0
margin_top = 5.0
margin_right = 122.0
margin_bottom = 27.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
text = "1层"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Location2" type="TextureRect" parent="HUD/HeaderBackground/GridContainer"]
margin_left = 130.0
margin_right = 162.0
margin_bottom = 32.0
texture = SubResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HpLabel" type="Label" parent="HUD/HeaderBackground/GridContainer"]
margin_left = 170.0
margin_top = 5.0
margin_right = 252.0
margin_bottom = 27.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
text = "1000"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Location3" type="TextureRect" parent="HUD/HeaderBackground/GridContainer"]
margin_left = 260.0
margin_right = 292.0
margin_bottom = 32.0
texture = SubResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AtkLabel" type="Label" parent="HUD/HeaderBackground/GridContainer"]
margin_left = 300.0
margin_top = 5.0
margin_right = 382.0
margin_bottom = 27.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
text = "100"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer2" type="GridContainer" parent="HUD/HeaderBackground"]
margin_left = 16.0
margin_top = 54.0
margin_right = 268.0
margin_bottom = 86.0
columns = 4
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Location" type="TextureRect" parent="HUD/HeaderBackground/GridContainer2"]
margin_right = 32.0
margin_bottom = 32.0
texture = SubResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DefLabel" type="Label" parent="HUD/HeaderBackground/GridContainer2"]
margin_left = 40.0
margin_top = 5.0
margin_right = 122.0
margin_bottom = 27.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
text = "100"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Location2" type="TextureRect" parent="HUD/HeaderBackground/GridContainer2"]
margin_left = 130.0
margin_right = 162.0
margin_bottom = 32.0
texture = SubResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MoneyLabel" type="Label" parent="HUD/HeaderBackground/GridContainer2"]
margin_left = 170.0
margin_top = 5.0
margin_right = 252.0
margin_bottom = 27.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
text = "0"
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer3" type="GridContainer" parent="HUD/HeaderBackground"]
margin_left = 268.0
margin_top = 54.0
margin_right = 360.0
margin_bottom = 86.0
columns = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="YellowKeyCount" type="Label" parent="HUD/HeaderBackground/GridContainer3"]
margin_right = 25.0
margin_bottom = 32.0
size_flags_horizontal = 3
size_flags_vertical = 7
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 0.866667, 0.666667, 0.533333, 1 )
text = "00"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BlueKeyCount" type="Label" parent="HUD/HeaderBackground/GridContainer3"]
margin_left = 33.0
margin_right = 58.0
margin_bottom = 32.0
size_flags_horizontal = 3
size_flags_vertical = 7
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 0.533333, 0.533333, 0.733333, 1 )
text = "00"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RedKeyCount" type="Label" parent="HUD/HeaderBackground/GridContainer3"]
margin_left = 66.0
margin_right = 91.0
margin_bottom = 32.0
size_flags_horizontal = 3
size_flags_vertical = 7
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 1, 0.533333, 0.533333, 1 )
text = "00"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BottomBackground" type="TextureRect" parent="HUD"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -207.0
margin_top = -32.0
margin_right = 207.0
texture = ExtResource( 6 )
stretch_mode = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="GridContainer" parent="HUD/BottomBackground"]
anchor_left = 0.231
anchor_top = 0.238
anchor_right = 0.329
anchor_bottom = 0.238
margin_left = -87.634
margin_top = -4.616
margin_right = 221.598
margin_bottom = 27.384
rect_scale = Vector2( 0.8, 0.8 )
columns = 8
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BookButton" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 7 )
[node name="FlyButton" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 8 )
[node name="TextureButton3" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 9 )
[node name="TextureButton4" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 10 )
[node name="TextureButton5" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 11 )
[node name="SaveButton" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
margin_right = 36.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 12 )
[node name="LoadButton" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
margin_left = 44.0
margin_right = 80.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 13 )
[node name="TextureButton8" type="TextureButton" parent="HUD/BottomBackground/VBoxContainer"]
visible = false
margin_left = 88.0
margin_right = 128.0
margin_bottom = 32.0
size_flags_horizontal = 3
texture_normal = SubResource( 14 )
[node name="Label" type="Label" parent="HUD/BottomBackground"]
margin_left = 288.0
margin_right = 414.0
margin_bottom = 32.0
size_flags_horizontal = 3
custom_fonts/font = ExtResource( 8 )
custom_colors/font_color = Color( 1, 0.0313726, 0.0313726, 1 )
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
text = "Normal"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MessageDialog" type="PopupDialog" parent="HUD"]
margin_top = 96.0
margin_right = 414.0
margin_bottom = 224.0
popup_exclusive = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ContentLabel" type="Label" parent="HUD/MessageDialog"]
anchor_left = 0.022
anchor_top = 0.02
anchor_right = 0.044
anchor_bottom = 0.02
margin_left = -1.108
margin_top = 5.44
margin_right = 386.784
margin_bottom = 93.44
custom_fonts/font = ExtResource( 8 )
text = "测试"
autowrap = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ClickLabel" type="Label" parent="HUD/MessageDialog"]
margin_left = 328.0
margin_top = 96.0
margin_right = 404.0
margin_bottom = 118.0
custom_fonts/font = ExtResource( 8 )
text = "点击继续..."
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BookDialog" type="PopupDialog" parent="HUD"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -208.0
margin_top = -176.0
margin_right = 208.0
margin_bottom = 240.0
popup_exclusive = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ScrollContainer" type="ScrollContainer" parent="HUD/BookDialog"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -200.0
margin_top = -200.0
margin_right = 197.0
margin_bottom = 152.0
size_flags_horizontal = 3
size_flags_vertical = 3
scroll_horizontal_enabled = false
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="HUD/BookDialog/ScrollContainer"]
margin_right = 397.0
margin_bottom = 352.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CloseBook" type="Button" parent="HUD/BookDialog"]
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -103.0
margin_top = -49.1
margin_right = -15.0
margin_bottom = -15.1
custom_styles/hover = SubResource( 15 )
custom_styles/pressed = SubResource( 16 )
custom_styles/focus = SubResource( 17 )
custom_styles/disabled = SubResource( 18 )
custom_styles/normal = SubResource( 19 )
custom_fonts/font = ExtResource( 8 )
text = "返回游戏"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FlyDialog" type="PopupDialog" parent="HUD"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -176.0
margin_top = -144.0
margin_right = 176.0
margin_bottom = 240.0
script = ExtResource( 9 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Title" type="Label" parent="HUD/FlyDialog"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -64.0
margin_top = 43.0
margin_right = 64.0
margin_bottom = 86.0
custom_fonts/font = SubResource( 20 )
text = "楼层跳跃"
[node name="Screenshot" type="TextureRect" parent="HUD/FlyDialog"]
anchor_top = 0.5
anchor_bottom = 0.5
margin_left = 32.0
margin_top = -88.0
margin_right = 225.0
margin_bottom = 128.0
expand = true
stretch_mode = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CurrentLevel" type="Label" parent="HUD/FlyDialog"]
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_left = -128.0
margin_top = -12.0
margin_right = -8.0
margin_bottom = 13.0
custom_fonts/font = ExtResource( 8 )
text = "魔塔 第01F"
align = 1
valign = 1
clip_text = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AddLevel" type="TextureButton" parent="HUD/FlyDialog"]
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_left = -72.0
margin_top = -40.0
margin_right = -56.0
margin_bottom = -32.0
texture_normal = SubResource( 22 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SubLevel" type="TextureButton" parent="HUD/FlyDialog"]
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_left = -72.0
margin_top = 33.0
margin_right = -56.0
margin_bottom = 41.0
texture_normal = SubResource( 23 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Close" type="Button" parent="HUD/FlyDialog"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -32.0
margin_top = -45.0
margin_right = 32.0
margin_bottom = -8.0
custom_styles/hover = SubResource( 24 )
custom_styles/pressed = SubResource( 25 )
custom_styles/focus = SubResource( 26 )
custom_styles/disabled = SubResource( 27 )
custom_styles/normal = SubResource( 28 )
custom_fonts/font = ExtResource( 8 )
text = "返回游戏"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Level" type="Node2D" parent="."]
script = ExtResource( 10 )
[node name="Level1" parent="Level" instance=ExtResource( 1 )]
[node name="BgmSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 5 )
volume_db = -10.0
[connection signal="popup_hide" from="HUD/BookDialog" to="HUD/BookDialog/ScrollContainer" method="_on_BookDialog_popup_hide"]
[connection signal="gui_input" from="HUD/FlyDialog/Screenshot" to="HUD/FlyDialog" method="_on_Screenshot_gui_input"]
[connection signal="pressed" from="HUD/FlyDialog/AddLevel" to="HUD/FlyDialog" method="_on_AddLevel_pressed"]
[connection signal="pressed" from="HUD/FlyDialog/SubLevel" to="HUD/FlyDialog" method="_on_SubLevel_pressed"]
[connection signal="pressed" from="HUD/FlyDialog/Close" to="HUD/FlyDialog" method="_on_Close_pressed"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/git_wcy/godot-mota.git
git@gitee.com:git_wcy/godot-mota.git
git_wcy
godot-mota
godot-mota
master

搜索帮助