pandemonium_demo_projects/2d/physics_platformer/player/Player.tscn

290 lines
7.2 KiB
Plaintext

[gd_scene load_steps=23 format=2]
[ext_resource path="res://player/player.gd" type="Script" id=1]
[ext_resource path="res://player/robot_demo.png" type="Texture" id=2]
[ext_resource path="res://player/bullet.png" type="Texture" id=3]
[ext_resource path="res://player/osb_left.png" type="Texture" id=4]
[ext_resource path="res://player/osb_right.png" type="Texture" id=5]
[ext_resource path="res://player/osb_jump.png" type="Texture" id=6]
[ext_resource path="res://player/osb_fire.png" type="Texture" id=7]
[ext_resource path="res://audio/sound_shoot.wav" type="AudioStream" id=8]
[ext_resource path="res://audio/sound_jump.wav" type="AudioStream" id=9]
[sub_resource type="PhysicsMaterial" id=1]
friction = 0.0
[sub_resource type="Gradient" id=2]
colors = PoolColorArray( 0.708353, 0.72498, 1, 1, 1, 1, 1, 0 )
[sub_resource type="Animation" id=3]
length = 0.01
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 22 ]
}
[sub_resource type="Animation" id=4]
length = 0.01
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 21 ]
}
[sub_resource type="Animation" id=5]
length = 0.5
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 26 ]
}
[sub_resource type="Animation" id=6]
length = 7.0
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 16, 17, 18, 16, 19, 20, 19, 16 ]
}
[sub_resource type="Animation" id=7]
length = 0.5
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 25 ]
}
[sub_resource type="Animation" id=8]
length = 0.5
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 23, 24, 23 ]
}
[sub_resource type="Animation" id=9]
length = 0.5
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 26 ]
}
[sub_resource type="Animation" id=10]
length = 1.25
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3, 4, 0 ]
}
[sub_resource type="Animation" id=11]
length = 1.25
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 5, 6, 7, 8, 9, 5 ]
}
[sub_resource type="Animation" id=12]
length = 1.25
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 10, 11, 12, 13, 14, 5 ]
}
[sub_resource type="RayShape2D" id=13]
custom_solver_bias = 0.5
length = 18.0
[node name="Player" type="RigidBody2D"]
mode = 2
mass = 1.5
physics_material_override = SubResource( 1 )
custom_integrator = true
contacts_reported = 3
script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
hframes = 16
vframes = 2
[node name="Smoke" type="CPUParticles2D" parent="Sprite"]
self_modulate = Color( 1, 1, 1, 0.26702 )
position = Vector2( 10, 1.5 )
rotation = -1.45648
emitting = false
lifetime = 0.3
one_shot = true
explosiveness = 1.0
local_coords = false
texture = ExtResource( 3 )
spread = 65.84
gravity = Vector2( 0, -15 )
initial_velocity = 10.14
angular_velocity = 200.0
angular_velocity_random = 1.0
linear_accel = 100.0
color_ramp = SubResource( 2 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/crouch = SubResource( 3 )
anims/falling = SubResource( 4 )
anims/falling_weapon = SubResource( 5 )
anims/idle = SubResource( 6 )
anims/idle_weapon = SubResource( 7 )
anims/jumping = SubResource( 8 )
anims/jumping_weapon = SubResource( 9 )
anims/run = SubResource( 10 )
anims/run_weapon = SubResource( 11 )
anims/standing_weapon_ready = SubResource( 12 )
[node name="Camera" type="Camera2D" parent="."]
current = true
zoom = Vector2( 0.5, 0.5 )
limit_left = 0
limit_top = 0
[node name="BulletShoot" type="Position2D" parent="."]
position = Vector2( 15, 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0.15, -6 )
shape = SubResource( 13 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( -0.138, 8.25, -10, -12, 11, -12 )
[node name="UI" type="CanvasLayer" parent="."]
layer = 0
[node name="Left" type="TouchScreenButton" parent="UI"]
position = Vector2( 27.7593, 360.87 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 4 )
passby_press = true
action = "move_left"
visibility_mode = 1
[node name="Right" type="TouchScreenButton" parent="UI"]
position = Vector2( 121.542, 361.415 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 5 )
passby_press = true
action = "move_right"
visibility_mode = 1
[node name="Jump" type="TouchScreenButton" parent="UI"]
position = Vector2( 666.224, 359.02 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 6 )
action = "jump"
visibility_mode = 1
[node name="Fire" type="TouchScreenButton" parent="UI"]
position = Vector2( 668.073, 262.788 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 7 )
action = "shoot"
visibility_mode = 1
[node name="SoundShoot" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 8 )
[node name="SoundJump" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 9 )