소스 검색

Add collision shape 2D

DricomDragon 5 년 전
부모
커밋
12285fb5cd
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      Player.tscn

+ 11 - 1
Player.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=6 format=2]
+[gd_scene load_steps=7 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]
@@ -18,6 +18,10 @@ animations = [ {
 "speed": 5.0
 } ]
 
+[sub_resource type="CapsuleShape2D" id=2]
+radius = 26.1109
+height = 14.0326
+
 [node name="Player" type="Area2D"]
 __meta__ = {
 "_edit_group_": true
@@ -27,3 +31,9 @@ __meta__ = {
 scale = Vector2( 0.5, 0.5 )
 frames = SubResource( 1 )
 animation = "up"
+__meta__ = {
+"_edit_group_": true
+}
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+shape = SubResource( 2 )