This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
/
Player.tscn
143 lines (121 loc) · 4.24 KB
/
Player.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[gd_scene load_steps=24 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://PlayerBullet.tscn" type="PackedScene" id=2]
[ext_resource path="res://Bomb.tscn" type="PackedScene" id=3]
[ext_resource path="res://art/mc/idle/mc_idle_frame_0.png" type="Texture" id=4]
[ext_resource path="res://art/mc/idle/mc_idle_frame_1.png" type="Texture" id=5]
[ext_resource path="res://art/mc/idle/mc_idle_frame_2.png" type="Texture" id=6]
[ext_resource path="res://art/mc/idle/mc_idle_frame_3.png" type="Texture" id=7]
[ext_resource path="res://art/mc/idle/mc_idle_frame_4.png" type="Texture" id=8]
[ext_resource path="res://art/mc/idle/mc_idle_frame_5.png" type="Texture" id=9]
[ext_resource path="res://art/mc/idle/mc_idle_frame_6.png" type="Texture" id=10]
[ext_resource path="res://art/mc/idle/mc_idle_frame_7.png" type="Texture" id=11]
[ext_resource path="res://art/mc/run/mc_run_frame_0.png" type="Texture" id=12]
[ext_resource path="res://art/mc/run/mc_run_frame_1.png" type="Texture" id=13]
[ext_resource path="res://art/mc/run/mc_run_frame_2.png" type="Texture" id=14]
[ext_resource path="res://art/mc/run/mc_run_frame_3.png" type="Texture" id=15]
[ext_resource path="res://art/mc/run/mc_run_frame_4.png" type="Texture" id=16]
[ext_resource path="res://art/mc/run/mc_run_frame_5.png" type="Texture" id=17]
[ext_resource path="res://art/mc/run/mc_run_frame_6.png" type="Texture" id=18]
[ext_resource path="res://art/mc/run/mc_run_frame_7.png" type="Texture" id=19]
[ext_resource path="res://audio/player_shot.ogg" type="AudioStream" id=20]
[ext_resource path="res://audio/bomb_throw.ogg" type="AudioStream" id=21]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ) ],
"loop": true,
"name": "idle",
"speed": 20.0
}, {
"frames": [ ExtResource( 12 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ) ],
"loop": true,
"name": "run",
"speed": 20.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
custom_solver_bias = 0.0
radius = 32.0
height = 64.0
[node name="Player" type="KinematicBody2D" groups=[
"Players",
]]
scale = Vector2( 1.5, 1.5 )
input_pickable = false
collision_layer = 2
collision_mask = 29
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Collision", "Transform" ]
level = 1
health = 200
gravity = 1000
floor_angle_tolerance = 50
walk_force = 1000
walk_min_speed = 20
walk_max_speed = 400
stop_force = 2300
jump_speed = 800
jump_max_airborne_time = 0.4
slide_stop_velocity = 1
slide_stop_min_travel = 1
bullet_damage = 5
bomb_damage = 100
bullet_speed = 500
bomb_force = 500
Bullet = ExtResource( 2 )
Bomb = ExtResource( 3 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
frames = SubResource( 1 )
animation = "idle"
frame = 6
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
shape = SubResource( 2 )
[node name="Camera2D" type="Camera2D" parent="." index="2"]
offset = Vector2( 240, -120 )
anchor_mode = 1
rotating = false
current = true
zoom = Vector2( 1, 1 )
limit_left = -10000000
limit_top = -10000000
limit_right = 10000000
limit_bottom = 10000000
limit_smoothed = false
drag_margin_h_enabled = true
drag_margin_v_enabled = true
smoothing_enabled = false
smoothing_speed = 5.0
offset_v = 0.0
offset_h = 0.0
drag_margin_left = 0.2
drag_margin_top = 0.2
drag_margin_right = 0.2
drag_margin_bottom = 0.2
editor_draw_screen = true
editor_draw_limits = false
editor_draw_drag_margin = false
[node name="BombTimer" type="Timer" parent="." index="3"]
process_mode = 1
wait_time = 5.0
one_shot = true
autostart = false
[node name="PlayerShot" type="AudioStreamPlayer2D" parent="." index="4"]
stream = ExtResource( 20 )
volume_db = 10.0
pitch_scale = 1.0
autoplay = false
max_distance = 2000.0
attenuation = 1.0
bus = "Master"
area_mask = 1
[node name="BombFly" type="AudioStreamPlayer2D" parent="." index="5"]
stream = ExtResource( 21 )
volume_db = 0.0
pitch_scale = 1.0
autoplay = false
max_distance = 2000.0
attenuation = 1.0
bus = "Master"
area_mask = 1
[connection signal="timeout" from="BombTimer" to="." method="_on_BombTimer_timeout"]