playersprite.tscn 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. [gd_scene load_steps=40 format=2]
  2. [ext_resource path="res://art/1/character 1__Idle.png" type="Texture" id=1]
  3. [ext_resource path="res://art/1/character 1__WALK.png" type="Texture" id=2]
  4. [ext_resource path="res://art/1/character 1__roll.png" type="Texture" id=3]
  5. [ext_resource path="res://weapons/sword1.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://font/yoster.ttf" type="DynamicFontData" id=5]
  7. [sub_resource type="AtlasTexture" id=1]
  8. atlas = ExtResource( 1 )
  9. region = Rect2( 0, 0, 120, 80 )
  10. [sub_resource type="AtlasTexture" id=2]
  11. atlas = ExtResource( 1 )
  12. region = Rect2( 120, 0, 120, 80 )
  13. [sub_resource type="AtlasTexture" id=3]
  14. atlas = ExtResource( 1 )
  15. region = Rect2( 240, 0, 120, 80 )
  16. [sub_resource type="AtlasTexture" id=4]
  17. atlas = ExtResource( 1 )
  18. region = Rect2( 360, 0, 120, 80 )
  19. [sub_resource type="AtlasTexture" id=5]
  20. atlas = ExtResource( 2 )
  21. region = Rect2( 0, 0, 120, 80 )
  22. [sub_resource type="AtlasTexture" id=6]
  23. atlas = ExtResource( 2 )
  24. region = Rect2( 120, 0, 120, 80 )
  25. [sub_resource type="AtlasTexture" id=7]
  26. atlas = ExtResource( 2 )
  27. region = Rect2( 240, 0, 120, 80 )
  28. [sub_resource type="AtlasTexture" id=8]
  29. atlas = ExtResource( 2 )
  30. region = Rect2( 360, 0, 120, 80 )
  31. [sub_resource type="AtlasTexture" id=9]
  32. atlas = ExtResource( 2 )
  33. region = Rect2( 480, 0, 120, 80 )
  34. [sub_resource type="AtlasTexture" id=10]
  35. atlas = ExtResource( 2 )
  36. region = Rect2( 600, 0, 120, 80 )
  37. [sub_resource type="AtlasTexture" id=11]
  38. atlas = ExtResource( 2 )
  39. region = Rect2( 720, 0, 120, 80 )
  40. [sub_resource type="AtlasTexture" id=12]
  41. atlas = ExtResource( 2 )
  42. region = Rect2( 840, 0, 120, 80 )
  43. [sub_resource type="AtlasTexture" id=13]
  44. atlas = ExtResource( 2 )
  45. region = Rect2( 960, 0, 120, 80 )
  46. [sub_resource type="AtlasTexture" id=14]
  47. atlas = ExtResource( 2 )
  48. region = Rect2( 1080, 0, 120, 80 )
  49. [sub_resource type="AtlasTexture" id=15]
  50. atlas = ExtResource( 3 )
  51. region = Rect2( 0, 0, 120, 80 )
  52. [sub_resource type="AtlasTexture" id=16]
  53. atlas = ExtResource( 3 )
  54. region = Rect2( 120, 0, 120, 80 )
  55. [sub_resource type="AtlasTexture" id=17]
  56. atlas = ExtResource( 3 )
  57. region = Rect2( 240, 0, 120, 80 )
  58. [sub_resource type="AtlasTexture" id=18]
  59. atlas = ExtResource( 3 )
  60. region = Rect2( 360, 0, 120, 80 )
  61. [sub_resource type="AtlasTexture" id=19]
  62. atlas = ExtResource( 3 )
  63. region = Rect2( 480, 0, 120, 80 )
  64. [sub_resource type="AtlasTexture" id=20]
  65. atlas = ExtResource( 3 )
  66. region = Rect2( 600, 0, 120, 80 )
  67. [sub_resource type="AtlasTexture" id=21]
  68. atlas = ExtResource( 3 )
  69. region = Rect2( 720, 0, 120, 80 )
  70. [sub_resource type="AtlasTexture" id=22]
  71. atlas = ExtResource( 3 )
  72. region = Rect2( 840, 0, 120, 80 )
  73. [sub_resource type="AtlasTexture" id=23]
  74. atlas = ExtResource( 3 )
  75. region = Rect2( 960, 0, 120, 80 )
  76. [sub_resource type="AtlasTexture" id=24]
  77. atlas = ExtResource( 3 )
  78. region = Rect2( 1080, 0, 120, 80 )
  79. [sub_resource type="AtlasTexture" id=25]
  80. atlas = ExtResource( 3 )
  81. region = Rect2( 1200, 0, 120, 80 )
  82. [sub_resource type="AtlasTexture" id=26]
  83. atlas = ExtResource( 3 )
  84. region = Rect2( 1320, 0, 120, 80 )
  85. [sub_resource type="SpriteFrames" id=27]
  86. animations = [ {
  87. "frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 2 ), SubResource( 3 ) ],
  88. "loop": true,
  89. "name": "idle",
  90. "speed": 4.0
  91. }, {
  92. "frames": [ SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ) ],
  93. "loop": true,
  94. "name": "walk",
  95. "speed": 15.0
  96. }, {
  97. "frames": [ SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ) ],
  98. "loop": true,
  99. "name": "roll",
  100. "speed": 15.0
  101. } ]
  102. [sub_resource type="GDScript" id=28]
  103. script/source = "extends AnimatedSprite
  104. # Declare member variables here. Examples:
  105. # var a = 2
  106. # var b = \"text\"
  107. # Called when the node enters the scene tree for the first time.
  108. func _ready():
  109. speed_scale = rand_range(0.8,1.2)
  110. pass # Replace with function body.
  111. func level_up_anim():
  112. $AnimationPlayer.play('leveup')
  113. # Called every frame. 'delta' is the elapsed time since the previous frame.
  114. #func _process(delta):
  115. # pass
  116. "
  117. [sub_resource type="Animation" id=29]
  118. resource_name = "leveup"
  119. length = 2.0
  120. tracks/0/type = "value"
  121. tracks/0/path = NodePath("Label/Label:rect_position")
  122. tracks/0/interp = 1
  123. tracks/0/loop_wrap = true
  124. tracks/0/imported = false
  125. tracks/0/enabled = true
  126. tracks/0/keys = {
  127. "times": PoolRealArray( 0, 2 ),
  128. "transitions": PoolRealArray( 1, 1 ),
  129. "update": 0,
  130. "values": [ Vector2( -29.5, -6 ), Vector2( -29.5, -67.1752 ) ]
  131. }
  132. tracks/1/type = "value"
  133. tracks/1/path = NodePath("Label/Label:rect_scale")
  134. tracks/1/interp = 1
  135. tracks/1/loop_wrap = true
  136. tracks/1/imported = false
  137. tracks/1/enabled = true
  138. tracks/1/keys = {
  139. "times": PoolRealArray( 0, 0.2, 1.3, 2 ),
  140. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  141. "update": 0,
  142. "values": [ Vector2( 0, 3 ), Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 3, 0 ) ]
  143. }
  144. tracks/2/type = "value"
  145. tracks/2/path = NodePath("Line2D:modulate")
  146. tracks/2/interp = 1
  147. tracks/2/loop_wrap = true
  148. tracks/2/imported = false
  149. tracks/2/enabled = true
  150. tracks/2/keys = {
  151. "times": PoolRealArray( 0, 0.2, 1.3, 2 ),
  152. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  153. "update": 0,
  154. "values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
  155. }
  156. [sub_resource type="Animation" id=30]
  157. resource_name = "leveup"
  158. length = 0.2
  159. loop = true
  160. tracks/0/type = "value"
  161. tracks/0/path = NodePath("Label/Label:custom_colors/font_color")
  162. tracks/0/interp = 1
  163. tracks/0/loop_wrap = true
  164. tracks/0/imported = false
  165. tracks/0/enabled = true
  166. tracks/0/keys = {
  167. "times": PoolRealArray( 0, 0.1 ),
  168. "transitions": PoolRealArray( 1, 1 ),
  169. "update": 0,
  170. "values": [ Color( 1, 0.717647, 0.305882, 1 ), Color( 0.631373, 1, 1, 1 ) ]
  171. }
  172. tracks/1/type = "value"
  173. tracks/1/path = NodePath("Label/Label:custom_colors/font_outline_modulate")
  174. tracks/1/interp = 1
  175. tracks/1/loop_wrap = true
  176. tracks/1/imported = false
  177. tracks/1/enabled = true
  178. tracks/1/keys = {
  179. "times": PoolRealArray( 0, 0.1 ),
  180. "transitions": PoolRealArray( 1, 1 ),
  181. "update": 0,
  182. "values": [ Color( 1, 0.156863, 0.0470588, 1 ), Color( 0.0784314, 0.286275, 0.552941, 1 ) ]
  183. }
  184. [sub_resource type="Shader" id=31]
  185. code = "shader_type canvas_item;
  186. render_mode blend_mix;
  187. void vertex(){
  188. VERTEX.y += (sin(TIME*32f)* mix(VERTEX.x,1f,0.8));
  189. }"
  190. [sub_resource type="ShaderMaterial" id=32]
  191. shader = SubResource( 31 )
  192. [sub_resource type="Gradient" id=33]
  193. offsets = PoolRealArray( 0.510949, 1 )
  194. colors = PoolColorArray( 1, 1, 1, 0.411765, 1, 1, 1, 0 )
  195. [sub_resource type="DynamicFont" id=34]
  196. size = 12
  197. outline_size = 2
  198. font_data = ExtResource( 5 )
  199. [node name="playersprite" type="AnimatedSprite"]
  200. frames = SubResource( 27 )
  201. animation = "idle"
  202. frame = 5
  203. playing = true
  204. offset = Vector2( 3.72692, -21.0081 )
  205. script = SubResource( 28 )
  206. [node name="weapon" parent="." instance=ExtResource( 4 )]
  207. position = Vector2( 0, -8.0534 )
  208. scale = Vector2( 0.75, 0.75 )
  209. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  210. anims/leveup = SubResource( 29 )
  211. [node name="AnimationPlayer2" type="AnimationPlayer" parent="."]
  212. autoplay = "leveup"
  213. anims/leveup = SubResource( 30 )
  214. [node name="Line2D" type="Line2D" parent="."]
  215. modulate = Color( 1, 1, 1, 0 )
  216. material = SubResource( 32 )
  217. points = PoolVector2Array( 0, 25, -0.651, -65 )
  218. width = 32.0
  219. default_color = Color( 1, 1, 1, 1 )
  220. gradient = SubResource( 33 )
  221. [node name="Label" type="Node2D" parent="."]
  222. [node name="Label" type="Label" parent="Label"]
  223. anchor_left = 0.5
  224. anchor_top = 0.5
  225. anchor_right = 0.5
  226. anchor_bottom = 0.5
  227. margin_left = -29.5
  228. margin_top = -67.1752
  229. margin_right = 29.5
  230. margin_bottom = -55.1752
  231. rect_scale = Vector2( 3, 1e-05 )
  232. rect_pivot_offset = Vector2( 27.5174, 6.3988 )
  233. custom_colors/font_color = Color( 0.688718, 0.956076, 0.892019, 1 )
  234. custom_colors/font_outline_modulate = Color( 0.221796, 0.266142, 0.474243, 1 )
  235. custom_fonts/font = SubResource( 34 )
  236. text = "Level Up"
  237. align = 1
  238. valign = 1