player.tscn 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. [gd_scene load_steps=12 format=2]
  2. [ext_resource path="res://player.gd" type="Script" id=1]
  3. [ext_resource path="res://charwalk.png" type="Texture" id=2]
  4. [ext_resource path="res://montserrat.otf" type="DynamicFontData" id=3]
  5. [sub_resource type="CircleShape2D" id=1]
  6. radius = 20.0
  7. [sub_resource type="Animation" id=2]
  8. resource_name = "standing"
  9. length = 0.8
  10. loop = true
  11. tracks/0/type = "value"
  12. tracks/0/path = NodePath("sprite:frame")
  13. tracks/0/interp = 1
  14. tracks/0/loop_wrap = true
  15. tracks/0/imported = false
  16. tracks/0/enabled = true
  17. tracks/0/keys = {
  18. "times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
  19. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  20. "update": 1,
  21. "values": [ 0, 4, 8, 12 ]
  22. }
  23. [sub_resource type="Animation" id=3]
  24. resource_name = "stunned"
  25. length = 1.2
  26. tracks/0/type = "value"
  27. tracks/0/path = NodePath("sprite:frame")
  28. tracks/0/interp = 1
  29. tracks/0/loop_wrap = true
  30. tracks/0/imported = false
  31. tracks/0/enabled = true
  32. tracks/0/keys = {
  33. "times": PoolRealArray( 0 ),
  34. "transitions": PoolRealArray( 1 ),
  35. "update": 1,
  36. "values": [ 0 ]
  37. }
  38. tracks/1/type = "value"
  39. tracks/1/path = NodePath("sprite:rotation_degrees")
  40. tracks/1/interp = 1
  41. tracks/1/loop_wrap = true
  42. tracks/1/imported = false
  43. tracks/1/enabled = true
  44. tracks/1/keys = {
  45. "times": PoolRealArray( 0, 1, 1.1 ),
  46. "transitions": PoolRealArray( 1, 0, 1 ),
  47. "update": 0,
  48. "values": [ 0.0, 720.0, 0.0 ]
  49. }
  50. tracks/2/type = "value"
  51. tracks/2/path = NodePath(".:stunned")
  52. tracks/2/interp = 1
  53. tracks/2/loop_wrap = true
  54. tracks/2/imported = false
  55. tracks/2/enabled = true
  56. tracks/2/keys = {
  57. "times": PoolRealArray( 1 ),
  58. "transitions": PoolRealArray( 1 ),
  59. "update": 1,
  60. "values": [ false ]
  61. }
  62. [sub_resource type="Animation" id=4]
  63. length = 0.8
  64. loop = true
  65. tracks/0/type = "value"
  66. tracks/0/path = NodePath("sprite:frame")
  67. tracks/0/interp = 1
  68. tracks/0/loop_wrap = true
  69. tracks/0/imported = false
  70. tracks/0/enabled = true
  71. tracks/0/keys = {
  72. "times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
  73. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  74. "update": 1,
  75. "values": [ 0, 4, 8, 12 ]
  76. }
  77. [sub_resource type="Animation" id=5]
  78. length = 0.8
  79. loop = true
  80. step = 0.2
  81. tracks/0/type = "value"
  82. tracks/0/path = NodePath("sprite:frame")
  83. tracks/0/interp = 1
  84. tracks/0/loop_wrap = true
  85. tracks/0/imported = false
  86. tracks/0/enabled = true
  87. tracks/0/keys = {
  88. "times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
  89. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  90. "update": 1,
  91. "values": [ 1, 5, 9, 13 ]
  92. }
  93. [sub_resource type="Animation" id=6]
  94. length = 0.8
  95. loop = true
  96. step = 0.2
  97. tracks/0/type = "value"
  98. tracks/0/path = NodePath("sprite:frame")
  99. tracks/0/interp = 1
  100. tracks/0/loop_wrap = true
  101. tracks/0/imported = false
  102. tracks/0/enabled = true
  103. tracks/0/keys = {
  104. "times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
  105. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  106. "update": 1,
  107. "values": [ 3, 7, 11, 15 ]
  108. }
  109. [sub_resource type="Animation" id=7]
  110. length = 0.8
  111. loop = true
  112. step = 0.2
  113. tracks/0/type = "value"
  114. tracks/0/path = NodePath("sprite:frame")
  115. tracks/0/interp = 1
  116. tracks/0/loop_wrap = true
  117. tracks/0/imported = false
  118. tracks/0/enabled = true
  119. tracks/0/keys = {
  120. "times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
  121. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  122. "update": 1,
  123. "values": [ 2, 6, 10, 14 ]
  124. }
  125. [sub_resource type="DynamicFont" id=8]
  126. size = 14
  127. font_data = ExtResource( 3 )
  128. [node name="player" type="KinematicBody2D"]
  129. script = ExtResource( 1 )
  130. [node name="sprite" type="Sprite" parent="."]
  131. position = Vector2( 0.0750351, 6.23615 )
  132. texture = ExtResource( 2 )
  133. offset = Vector2( -0.0750351, -6.23615 )
  134. hframes = 4
  135. vframes = 4
  136. [node name="shape" type="CollisionShape2D" parent="."]
  137. shape = SubResource( 1 )
  138. [node name="anim" type="AnimationPlayer" parent="."]
  139. anims/standing = SubResource( 2 )
  140. anims/stunned = SubResource( 3 )
  141. anims/walk_down = SubResource( 4 )
  142. anims/walk_left = SubResource( 5 )
  143. anims/walk_right = SubResource( 6 )
  144. anims/walk_up = SubResource( 7 )
  145. [node name="label" type="Label" parent="."]
  146. margin_left = -82.0
  147. margin_top = -35.0
  148. margin_right = 85.0
  149. margin_bottom = -14.0
  150. size_flags_horizontal = 2
  151. size_flags_vertical = 0
  152. custom_fonts/font = SubResource( 8 )
  153. text = "Player 1"
  154. align = 1