Player.tscn 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. [gd_scene load_steps=8 format=2]
  2. [ext_resource path="res://Player.gd" type="Script" id=1]
  3. [ext_resource path="res://dodge_assets/art/playerGrey_walk1.png" type="Texture" id=2]
  4. [ext_resource path="res://dodge_assets/art/playerGrey_walk2.png" type="Texture" id=3]
  5. [ext_resource path="res://dodge_assets/art/playerGrey_up1.png" type="Texture" id=4]
  6. [ext_resource path="res://dodge_assets/art/playerGrey_up2.png" type="Texture" id=5]
  7. [sub_resource type="SpriteFrames" id=1]
  8. animations = [ {
  9. "frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
  10. "loop": true,
  11. "name": "right",
  12. "speed": 5.0
  13. }, {
  14. "frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
  15. "loop": true,
  16. "name": "up",
  17. "speed": 5.0
  18. } ]
  19. [sub_resource type="CapsuleShape2D" id=2]
  20. radius = 26.1109
  21. height = 14.0326
  22. [node name="Player" type="Area2D"]
  23. script = ExtResource( 1 )
  24. __meta__ = {
  25. "_edit_group_": true
  26. }
  27. [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
  28. scale = Vector2( 0.5, 0.5 )
  29. frames = SubResource( 1 )
  30. animation = "up"
  31. __meta__ = {
  32. "_edit_group_": true
  33. }
  34. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  35. shape = SubResource( 2 )
  36. [connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]