alai/godot/characters/player/Player.tscn

49 lines
1.6 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=9 format=2]
2022-04-05 14:51:59 -04:00
[ext_resource path="res://characters/player/sprites/green.tres" type="SpriteFrames" id=1]
[ext_resource path="res://characters/player/states/Idle.gdns" type="Script" id=2]
[ext_resource path="res://state_machine/StateMachine.gdns" type="Script" id=3]
[ext_resource path="res://characters/player/states/Move.gdns" type="Script" id=4]
[ext_resource path="res://characters/player/Player.gdns" type="Script" id=5]
[ext_resource path="res://characters/player/states/Jump.gdns" type="Script" id=6]
[ext_resource path="res://characters/player/states/Fall.gdns" type="Script" id=7]
2022-04-05 14:51:59 -04:00
[sub_resource type="RectangleShape2D" id=1]
2022-07-21 00:05:08 -04:00
extents = Vector2( 6.5, 11.5 )
2022-04-05 14:51:59 -04:00
[node name="Player" type="KinematicBody2D"]
2022-07-21 00:05:08 -04:00
collision_mask = 10
script = ExtResource( 5 )
2022-04-05 14:51:59 -04:00
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = ExtResource( 1 )
animation = "idle"
centered = false
flip_h = true
2022-04-05 14:51:59 -04:00
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
2022-07-21 00:05:08 -04:00
position = Vector2( 12.5, 12.5 )
2022-04-05 14:51:59 -04:00
shape = SubResource( 1 )
2022-04-09 22:16:27 -04:00
[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 3 )
default_state = "Idle"
2022-04-09 22:16:27 -04:00
[node name="Idle" type="Node" parent="StateMachine"]
script = ExtResource( 2 )
2022-04-09 22:16:27 -04:00
[node name="Move" type="Node" parent="StateMachine"]
script = ExtResource( 4 )
2022-04-09 22:16:27 -04:00
[node name="Jump" type="Node" parent="StateMachine"]
script = ExtResource( 6 )
2022-04-09 22:16:27 -04:00
[node name="Fall" type="Node" parent="StateMachine"]
script = ExtResource( 7 )
2022-07-21 00:05:08 -04:00
[node name="PlatformDetector" type="RayCast2D" parent="."]
position = Vector2( 12, 0 )
enabled = true
cast_to = Vector2( 0, 32 )
collision_mask = 24