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="CircleShape2D" id=2]
  20. radius = 15.9444
  21. [node name="Player" type="Area2D"]
  22. script = ExtResource( 1 )
  23. __meta__ = {
  24. "_edit_group_": true
  25. }
  26. [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
  27. scale = Vector2( 0.5, 0.5 )
  28. frames = SubResource( 1 )
  29. animation = "up"
  30. __meta__ = {
  31. "_edit_group_": true
  32. }
  33. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  34. position = Vector2( 0, -6.70612 )
  35. shape = SubResource( 2 )
  36. [connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]