浏览代码

Add animation sprite

DricomDragon 5 年之前
父节点
当前提交
da1796946a
共有 1 个文件被更改,包括 27 次插入1 次删除
  1. 27 1
      Player.tscn

+ 27 - 1
Player.tscn

@@ -1,3 +1,29 @@
-[gd_scene format=2]
+[gd_scene load_steps=6 format=2]
+
+[ext_resource path="res://dodge_assets/art/playerGrey_walk1.png" type="Texture" id=1]
+[ext_resource path="res://dodge_assets/art/playerGrey_walk2.png" type="Texture" id=2]
+[ext_resource path="res://dodge_assets/art/playerGrey_up1.png" type="Texture" id=3]
+[ext_resource path="res://dodge_assets/art/playerGrey_up2.png" type="Texture" id=4]
+
+[sub_resource type="SpriteFrames" id=1]
+animations = [ {
+"frames": [ ExtResource( 1 ), ExtResource( 2 ) ],
+"loop": true,
+"name": "right",
+"speed": 5.0
+}, {
+"frames": [ ExtResource( 3 ), ExtResource( 4 ) ],
+"loop": true,
+"name": "up",
+"speed": 5.0
+} ]
 
 [node name="Player" type="Area2D"]
+__meta__ = {
+"_edit_group_": true
+}
+
+[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
+scale = Vector2( 0.5, 0.5 )
+frames = SubResource( 1 )
+animation = "up"