Make Hedgehog a subscene of Player

This commit is contained in:
Fabien Freling 2018-07-19 15:37:24 +02:00
parent afb76aa9b0
commit c5a7313468
5 changed files with 1070 additions and 165 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,8 @@
[gd_scene load_steps=6 format=2] [gd_scene load_steps=4 format=2]
[ext_resource path="res://mlib.meshlib" type="MeshLibrary" id=1] [ext_resource path="res://mlib.meshlib" type="MeshLibrary" id=1]
[ext_resource path="res://Player.tscn" type="PackedScene" id=2] [ext_resource path="res://Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Goal.tscn" type="PackedScene" id=3] [ext_resource path="res://Goal.tscn" type="PackedScene" id=3]
[ext_resource path="res://Hedgehog.tscn" type="PackedScene" id=4]
[ext_resource path="res://Player.gd" type="Script" id=5]
[node name="Node" type="Node" index="0"] [node name="Node" type="Node" index="0"]
@ -48,15 +46,9 @@ _sections_unfolded = [ "Transform" ]
[node name="Player" parent="." index="2" instance=ExtResource( 2 )] [node name="Player" parent="." index="2" instance=ExtResource( 2 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -2.88637, 3.48439, -2.72332 ) transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -2.88637, 3.48439, -2.72332 )
visible = false
[node name="Goal" parent="." index="3" instance=ExtResource( 3 )] [node name="Goal" parent="." index="3" instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 3, 1 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 3, 1 )
[node name="Hedgehog" parent="." index="4" instance=ExtResource( 4 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -3, 3, -3 )
script = ExtResource( 5 )

View file

@ -1,31 +1,11 @@
[gd_scene load_steps=6 format=2] [gd_scene load_steps=4 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1] [ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://Hedgehog.tscn" type="PackedScene" id=2]
[sub_resource type="CapsuleShape" id=1] [sub_resource type="BoxShape" id=1]
radius = 1.0 extents = Vector3( 1, 1, 1 )
height = 1.0
[sub_resource type="CapsuleMesh" id=2]
radius = 1.0
mid_height = 1.0
radial_segments = 64
rings = 8
[sub_resource type="Shader" id=3]
code = "shader_type spatial;
void fragment() {
ALBEDO = vec3(1.0, 0.0, 0.0);
}"
[sub_resource type="ShaderMaterial" id=4]
render_priority = 0
shader = SubResource( 3 )
[node name="Player" type="KinematicBody"] [node name="Player" type="KinematicBody"]
@ -47,20 +27,9 @@ script = ExtResource( 1 )
shape = SubResource( 1 ) shape = SubResource( 1 )
disabled = false disabled = false
[node name="MeshInstance" type="MeshInstance" parent="." index="1"] [node name="Hedgehog" parent="." index="1" instance=ExtResource( 2 )]
layers = 1 transform = Transform( 0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0 )
material_override = null _sections_unfolded = [ "Transform" ]
cast_shadow = 1
extra_cull_margin = 0.0
use_in_baked_light = false
lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = SubResource( 2 )
skeleton = NodePath("..")
material/0 = SubResource( 4 )
_sections_unfolded = [ "material" ]

View file

@ -10,12 +10,12 @@ source_file="res://models/hedgehog.glb"
source_md5="423036f859e8ad215f66f14031dd1002" source_md5="423036f859e8ad215f66f14031dd1002"
dest_files=[ "res://.import/hedgehog.glb-6558d7cc622faf8bf0293e4ee80147ea.scn" ] dest_files=[ "res://.import/hedgehog.glb-6558d7cc622faf8bf0293e4ee80147ea.scn" ]
dest_md5="9e57875024bb451a3f1dbd3b82e279ae" dest_md5="209d1ce6295f120130a3e789fad1c45e"
[params] [params]
nodes/root_type="KinematicBody" nodes/root_type="Spatial"
nodes/root_name="Scene Root" nodes/root_name="Hedgehog"
nodes/root_scale=1.0 nodes/root_scale=1.0
nodes/custom_script="" nodes/custom_script=""
nodes/storage=0 nodes/storage=0

File diff suppressed because it is too large Load diff