Split player into seperate scene
This commit is contained in:
parent
d96a68947e
commit
21bcbeff32
|
@ -0,0 +1,23 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Player/Player.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://Player/Player.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
|
radius = 4.0
|
||||||
|
height = 6.0
|
||||||
|
|
||||||
|
[node name="Player" type="KinematicBody2D"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_group_": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
hframes = 60
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, 9 )
|
||||||
|
rotation = -1.5708
|
||||||
|
shape = SubResource( 1 )
|
25
World.tscn
25
World.tscn
|
@ -1,12 +1,7 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://World/Bush.png" type="Texture" id=1]
|
[ext_resource path="res://World/Bush.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://Player/Player.png" type="Texture" id=2]
|
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Player/Player.gd" type="Script" id=3]
|
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=1]
|
|
||||||
radius = 4.0
|
|
||||||
height = 6.0
|
|
||||||
|
|
||||||
[node name="World" type="Node2D"]
|
[node name="World" type="Node2D"]
|
||||||
|
|
||||||
|
@ -14,21 +9,7 @@ height = 6.0
|
||||||
position = Vector2( 63, 65 )
|
position = Vector2( 63, 65 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody2D" parent="."]
|
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||||
position = Vector2( 101, 34 )
|
|
||||||
script = ExtResource( 3 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_group_": true
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="Player"]
|
|
||||||
texture = ExtResource( 2 )
|
|
||||||
hframes = 60
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
|
|
||||||
position = Vector2( 0, 9 )
|
|
||||||
rotation = -1.5708
|
|
||||||
shape = SubResource( 1 )
|
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue