mittagessen kommt immer naher
This commit is contained in:
1 parent
3ef7ffd031
commit
81f5b9d15a
8 files changed
+89
-10
No files matched your search
@@ -5,9 +5,10 @@ extends VBoxContainer
|
||||
func _ready():
|
||||
for entry in BodyPartLoader.bodyparts:
|
||||
var button = Button.new()
|
||||
button.text = entry.key
|
||||
button.text = entry
|
||||
add_child(button)
|
||||
button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text])
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
func button_pressed(params):
|
||||
emit_signal("choose_bodypart", params[0])
|
||||
@@ -47,7 +47,7 @@ handle_input_locally = false
|
||||
render_target_update_mode = 3
|
||||
|
||||
[node name="Camera" type="Camera" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.16872 )
|
||||
|
||||
[node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||
enabled = true
|
||||
@@ -55,3 +55,5 @@ collide_with_areas = true
|
||||
collide_with_bodies = false
|
||||
|
||||
[node name="Torso" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[editable path="Torso"]
|
||||
@@ -18,6 +18,7 @@ var _viewport : Viewport
|
||||
var _velx = 0
|
||||
var _vely = 0
|
||||
|
||||
var _attachment_point : Spatial
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
@@ -66,6 +67,7 @@ func _physics_process(delta):
|
||||
|
||||
if _rayCast.is_colliding():
|
||||
# collider will be the node hit
|
||||
_attachment_point = _rayCast.get_collider().get_parent()
|
||||
print(_rayCast.get_collider())
|
||||
|
||||
|
||||
@@ -79,4 +81,7 @@ func _input(event):
|
||||
else:
|
||||
print("mouse unpressed at: ", event.position)
|
||||
_viewRot = false
|
||||
|
||||
|
||||
|
||||
func body_part_chosen(params):
|
||||
_attachment_point.add_child(BodyPartLoader.bodyparts[params].instance())
|
||||
Reference in new issue
Block a user