Add Player scene
This commit is contained in:
parent
be23e498b0
commit
d6afcd4f70
|
@ -1,6 +1,7 @@
|
||||||
[gd_scene load_steps=2 format=2]
|
[gd_scene load_steps=3 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]
|
||||||
|
|
||||||
[node name="Node" type="Node" index="0"]
|
[node name="Node" type="Node" index="0"]
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ cell_scale = 1.0
|
||||||
collision_layer = 1
|
collision_layer = 1
|
||||||
collision_mask = 1
|
collision_mask = 1
|
||||||
data = {
|
data = {
|
||||||
"cells": PoolIntArray( 0, 0, 1441792, 65534, 0, -535429120, 65535, 0, -535429120, 0, 65534, 1441792, 65534, 65534, 1441792, 65535, 65534, -535429120, 131070, 65534, 1441793, 0, 65535, 538312704, 65534, 65535, -535429120 )
|
"cells": PoolIntArray( 0, 0, 1441792, 65534, 0, 1441792, 65535, 0, 1441792, 0, 65534, 1441792, 65534, 65534, 1441792, 65535, 65534, 1441792, 0, 65535, 1441792, 65534, 65535, 1441792 )
|
||||||
}
|
}
|
||||||
_sections_unfolded = [ "Cell", "Collision", "Transform", "Visibility" ]
|
_sections_unfolded = [ "Cell", "Collision", "Transform", "Visibility" ]
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
|
@ -41,4 +42,8 @@ near = 0.05
|
||||||
far = 100.0
|
far = 100.0
|
||||||
_sections_unfolded = [ "Transform" ]
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
|
[node name="Player" parent="." index="2" instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.88637, 3.48439, -2.72332 )
|
||||||
|
|
||||||
|
|
||||||
|
|
15
Player.gd
Normal file
15
Player.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Spatial
|
||||||
|
|
||||||
|
# class member variables go here, for example:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "textvar"
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
# Called every time the node is added to the scene.
|
||||||
|
# Initialization here
|
||||||
|
pass
|
||||||
|
|
||||||
|
#func _process(delta):
|
||||||
|
# # Called every frame. Delta is time since last frame.
|
||||||
|
# # Update game logic here.
|
||||||
|
# pass
|
45
Player.tscn
Normal file
45
Player.tscn
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Player.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleMesh" id=1]
|
||||||
|
|
||||||
|
radius = 1.0
|
||||||
|
mid_height = 1.0
|
||||||
|
radial_segments = 64
|
||||||
|
rings = 8
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id=2]
|
||||||
|
|
||||||
|
code = "shader_type spatial;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
ALBEDO = vec3(1.0, 0.0, 0.0);
|
||||||
|
}"
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=3]
|
||||||
|
|
||||||
|
render_priority = 0
|
||||||
|
shader = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="Player" type="Spatial"]
|
||||||
|
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="MeshInstance" type="MeshInstance" parent="." index="0"]
|
||||||
|
|
||||||
|
layers = 1
|
||||||
|
material_override = null
|
||||||
|
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( 1 )
|
||||||
|
skeleton = NodePath("..")
|
||||||
|
material/0 = SubResource( 3 )
|
||||||
|
_sections_unfolded = [ "material" ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue