1 Star 0 Fork 0

lianxinghao/Godot_2D_Game

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
player.tscn 5.01 KB
一键复制 编辑 原始数据 按行查看 历史
[gd_scene load_steps=19 format=3 uid="uid://cy8kli6nhdvbc"]
[ext_resource type="Script" path="res://script/player.gd" id="1_2t1uc"]
[ext_resource type="Texture2D" uid="uid://b1uuhk6x3lbfq" path="res://animate/player.png" id="1_n6orx"]
[ext_resource type="PackedScene" uid="uid://dnkmem6t5ds2x" path="res://scene/rucksack.tscn" id="3_rklxc"]
[ext_resource type="PackedScene" uid="uid://chv4jn145wqg8" path="res://weapon/bow.tscn" id="4_r4o70"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jarqj"]
size = Vector2(32, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_eisix"]
atlas = ExtResource("1_n6orx")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_dferw"]
atlas = ExtResource("1_n6orx")
region = Rect2(144, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_xf0gf"]
atlas = ExtResource("1_n6orx")
region = Rect2(0, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_sdlvw"]
atlas = ExtResource("1_n6orx")
region = Rect2(24, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_ue48q"]
atlas = ExtResource("1_n6orx")
region = Rect2(48, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_3t4cv"]
atlas = ExtResource("1_n6orx")
region = Rect2(72, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_51ygp"]
atlas = ExtResource("1_n6orx")
region = Rect2(96, 0, 24, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_lueji"]
atlas = ExtResource("1_n6orx")
region = Rect2(120, 0, 24, 20)
[sub_resource type="SpriteFrames" id="SpriteFrames_oowc7"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_eisix")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dferw")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xf0gf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sdlvw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ue48q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3t4cv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_51ygp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lueji")
}],
"loop": true,
"name": &"run",
"speed": 20.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d70in"]
size = Vector2(32, 40)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rr617"]
size = Vector2(32, 40)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ibqyd"]
size = Vector2(32, 40)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1mjwb"]
size = Vector2(32, 40)
[node name="Player" type="CharacterBody2D"]
collision_layer = 2
script = ExtResource("1_2t1uc")
[node name="player_collision" type="CollisionShape2D" parent="."]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_jarqj")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(2, 2.4)
sprite_frames = SubResource("SpriteFrames_oowc7")
animation = &"run"
[node name="Camera2D" type="Camera2D" parent="."]
[node name="ColorRect" type="ColorRect" parent="Camera2D"]
visible = false
offset_left = -560.0
offset_top = -304.0
offset_right = -376.0
offset_bottom = -120.0
color = Color(1, 1, 1, 0)
metadata/_edit_lock_ = true
[node name="grid" parent="Camera2D/ColorRect" instance=ExtResource("3_rklxc")]
layout_mode = 1
offset_right = 184.0
offset_bottom = 184.0
metadata/_edit_lock_ = true
[node name="danger_area" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 4
[node name="danger_collision" type="CollisionShape2D" parent="danger_area"]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_d70in")
[node name="source_area" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 8
[node name="source_collision" type="CollisionShape2D" parent="source_area"]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_rr617")
[node name="next_area" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 16
[node name="outdoor_collision" type="CollisionShape2D" parent="next_area"]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_ibqyd")
[node name="pre_area" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 64
[node name="pre_collision" type="CollisionShape2D" parent="pre_area"]
position = Vector2(0, 4)
shape = SubResource("RectangleShape2D_1mjwb")
[node name="ProgressBar" type="ProgressBar" parent="."]
modulate = Color(1, 0, 0, 1)
offset_left = -33.0
offset_top = -37.0
offset_right = 32.0
offset_bottom = -24.0
scale = Vector2(1.02711, 0.839919)
value = 100.0
show_percentage = false
[node name="Bow" parent="." instance=ExtResource("4_r4o70")]
visible = false
[connection signal="ready" from="." to="." method="_on_ready"]
[connection signal="area_entered" from="danger_area" to="." method="meet_danger"]
[connection signal="area_entered" from="source_area" to="." method="meet_heart"]
[connection signal="area_entered" from="next_area" to="." method="succeed"]
[connection signal="area_entered" from="pre_area" to="." method="pre_level"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lianxinghao/godot_2-d_-game.git
git@gitee.com:lianxinghao/godot_2-d_-game.git
lianxinghao
godot_2-d_-game
Godot_2D_Game
lxh

搜索帮助