parent
30e87cccf0
commit
b82e328a49
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
[ext_resource path="res://Characters/Meldewesen/Meldewesen.gd" type="Script" id=1]
|
[ext_resource path="res://Characters/Meldewesen/Meldewesen.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="CylinderMesh" id=1]
|
[sub_resource type="CylinderMesh" id=1]
|
||||||
top_radius = 0.8
|
top_radius = 0.8
|
||||||
|
|
||||||
|
23
Characters/Worker/Worker.gd
Normal file
23
Characters/Worker/Worker.gd
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
extends NPC
|
||||||
|
|
||||||
|
|
||||||
|
var _interactArea: Area
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
#Logger.set_logger_level(Logger.LOG_LEVEL_FINE)
|
||||||
|
|
||||||
|
# setup collisions with player
|
||||||
|
var _interactArea = get_node("InteractArea") as Area
|
||||||
|
assert(null != _interactArea)
|
||||||
|
_interactArea.connect("area_entered", self, "_on_area_entered")
|
||||||
|
|
||||||
|
func _process(_delta):
|
||||||
|
# TODO: movement
|
||||||
|
#if current_target: # should not be needed -> handled per navigation path
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_entered (area: Area):
|
||||||
|
if area.is_in_group("FactoryEntry"):
|
||||||
|
# TODO: despawn
|
||||||
|
pass
|
48
Characters/Worker/Worker.tscn
Normal file
48
Characters/Worker/Worker.tscn
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Characters/Worker/Worker.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderMesh" id=1]
|
||||||
|
top_radius = 0.8
|
||||||
|
|
||||||
|
[sub_resource type="CylinderMesh" id=2]
|
||||||
|
top_radius = 0.8
|
||||||
|
bottom_radius = 0.001
|
||||||
|
|
||||||
|
[sub_resource type="PrismMesh" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape" id=5]
|
||||||
|
|
||||||
|
[node name="Worker" type="KinematicBody"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Meshes" type="Spatial" parent="."]
|
||||||
|
|
||||||
|
[node name="TrueAppearance" type="MeshInstance" parent="Meshes"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||||
|
layers = 2
|
||||||
|
mesh = SubResource( 1 )
|
||||||
|
material/0 = null
|
||||||
|
|
||||||
|
[node name="MaskedAppearance" type="MeshInstance" parent="Meshes"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||||
|
mesh = SubResource( 2 )
|
||||||
|
material/0 = null
|
||||||
|
|
||||||
|
[node name="MeshInstance" type="MeshInstance" parent="Meshes"]
|
||||||
|
transform = Transform( 0.1, 0, 0, 0, -4.37114e-009, 0.1, 0, -0.1, -4.37114e-009, 0, 1.8, -0.9 )
|
||||||
|
layers = 3
|
||||||
|
mesh = SubResource( 3 )
|
||||||
|
material/0 = null
|
||||||
|
|
||||||
|
[node name="Collider" type="CollisionShape" parent="."]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||||
|
shape = SubResource( 4 )
|
||||||
|
|
||||||
|
[node name="InteractArea" type="Area" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="InteractArea"]
|
||||||
|
transform = Transform( 1.2, 0, 0, 0, 1, 0, 0, 0, 1.2, 0, 1, 0 )
|
||||||
|
shape = SubResource( 5 )
|
@ -7,7 +7,7 @@ var _worker
|
|||||||
var _lastSpawn = 0 # timestamp of last spawned worker
|
var _lastSpawn = 0 # timestamp of last spawned worker
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
_worker = load("res://Characters/Meldewesen/Meldewesen.tscn")
|
_worker = load("res://Characters/Worker/Worker.tscn")
|
||||||
assert(null != _worker)
|
assert(null != _worker)
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user