Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
This commit is contained in:
commit
0f5d388278
Binary file not shown.
Binary file not shown.
BIN
3D Input/Grundkörper Version 2.blend
Normal file
BIN
3D Input/Grundkörper Version 2.blend
Normal file
Binary file not shown.
BIN
3D Input/Grundkörper Version 2.blend1
Normal file
BIN
3D Input/Grundkörper Version 2.blend1
Normal file
Binary file not shown.
BIN
3D Input/Mensch_Bein.blend
Normal file
BIN
3D Input/Mensch_Bein.blend
Normal file
Binary file not shown.
BIN
3D Input/Mensch_Bein.blend1
Normal file
BIN
3D Input/Mensch_Bein.blend1
Normal file
Binary file not shown.
34
3D Input/Mensch_vogelarm_img.jpg.import
Normal file
34
3D Input/Mensch_vogelarm_img.jpg.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Mensch_vogelarm_img.jpg-5d39f9db9f9783e3ca3f442f40cfd4a4.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://3D Input/Mensch_vogelarm_img.jpg"
|
||||||
|
dest_files=[ "res://.import/Mensch_vogelarm_img.jpg-5d39f9db9f9783e3ca3f442f40cfd4a4.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
@ -4,11 +4,11 @@ extends VBoxContainer
|
|||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
for entry in BodyPartLoader.bodyparts:
|
for entry in BodyPartLoader.bodyparts:
|
||||||
#var button = Button.new()
|
var button = Button.new()
|
||||||
#button.text = entry.key
|
button.text = entry
|
||||||
pass
|
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 button_pressed(params):
|
||||||
#func _process(delta):
|
emit_signal("choose_bodypart", params[0])
|
||||||
# pass
|
|
||||||
|
@ -47,7 +47,7 @@ handle_input_locally = false
|
|||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
|
||||||
[node name="Camera" type="Camera" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
[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"]
|
[node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||||
enabled = true
|
enabled = true
|
||||||
@ -55,3 +55,5 @@ collide_with_areas = true
|
|||||||
collide_with_bodies = false
|
collide_with_bodies = false
|
||||||
|
|
||||||
[node name="Torso" parent="." instance=ExtResource( 1 )]
|
[node name="Torso" parent="." instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[editable path="Torso"]
|
||||||
|
@ -18,6 +18,7 @@ var _viewport : Viewport
|
|||||||
var _velx = 0
|
var _velx = 0
|
||||||
var _vely = 0
|
var _vely = 0
|
||||||
|
|
||||||
|
var _attachment_point : Spatial
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
@ -66,15 +67,21 @@ func _physics_process(delta):
|
|||||||
|
|
||||||
if _rayCast.is_colliding():
|
if _rayCast.is_colliding():
|
||||||
# collider will be the node hit
|
# collider will be the node hit
|
||||||
|
_attachment_point = _rayCast.get_collider().get_parent()
|
||||||
print(_rayCast.get_collider())
|
print(_rayCast.get_collider())
|
||||||
|
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
if _viewport.get_viewport().get_mouse_position().x >= 0:
|
||||||
if event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
if event.pressed and _viewport.get_viewport().get_mouse_position().x >= 0:
|
if event.pressed:
|
||||||
print("Mouse Click at: ", event.position)
|
print("Mouse Click at: ", event.position)
|
||||||
_prev_mouse_pos = event.position
|
_prev_mouse_pos = event.position
|
||||||
_viewRot = true
|
_viewRot = true
|
||||||
else:
|
else:
|
||||||
print("mouse unpressed at: ", event.position)
|
print("mouse unpressed at: ", event.position)
|
||||||
_viewRot = false
|
_viewRot = false
|
||||||
|
|
||||||
|
|
||||||
|
func body_part_chosen(params):
|
||||||
|
_attachment_point.add_child(BodyPartLoader.bodyparts[params].instance())
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=7 format=2]
|
[gd_scene load_steps=8 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1]
|
[ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1]
|
||||||
|
|
||||||
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
[sub_resource type="SphereMesh" id=3]
|
[sub_resource type="SphereMesh" id=3]
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=4]
|
[sub_resource type="GDScript" id=4]
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=5]
|
[sub_resource type="SphereShape" id=5]
|
||||||
|
|
||||||
[node name="Torso" type="RigidBody" groups=[
|
[sub_resource type="SphereShape" id=6]
|
||||||
"Player",
|
|
||||||
]]
|
[node name="Torso" type="RigidBody"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="TorsoMesh" type="MeshInstance" parent="."]
|
[node name="TorsoMesh" type="MeshInstance" parent="."]
|
||||||
@ -22,6 +22,7 @@ mesh = SubResource( 1 )
|
|||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="TorsoCollider" type="CollisionShape" parent="."]
|
[node name="TorsoCollider" type="CollisionShape" parent="."]
|
||||||
|
transform = Transform( 0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="FrontLeft" type="Spatial" parent="."]
|
[node name="FrontLeft" type="Spatial" parent="."]
|
||||||
@ -33,16 +34,17 @@ mesh = SubResource( 3 )
|
|||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="Area" type="Area" parent="FrontLeft"]
|
[node name="Area" type="Area" parent="FrontLeft"]
|
||||||
|
script = SubResource( 4 )
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="FrontLeft/Area"]
|
[node name="CollisionShape" type="CollisionShape" parent="FrontLeft/Area"]
|
||||||
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
||||||
shape = SubResource( 4 )
|
shape = SubResource( 5 )
|
||||||
|
|
||||||
[node name="FrontRight" type="Spatial" parent="."]
|
[node name="FrontRight" type="Spatial" parent="."]
|
||||||
transform = Transform( 0.5, -1.62921e-07, 0.866025, -3.25841e-07, -1, 0, 0.866025, -2.82187e-07, -0.5, -0.6, 0, 1 )
|
transform = Transform( 0.5, -1.62921e-07, 0.866025, -3.25841e-07, -1, 0, 0.866025, -2.82187e-07, -0.5, -0.6, 0, 1 )
|
||||||
|
|
||||||
[node name="FrontRightAttachMent" type="MeshInstance" parent="FrontRight"]
|
[node name="FrontRightAttachMent" type="MeshInstance" parent="FrontRight"]
|
||||||
transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 5.0822e-21, 0.3, 0, 0, 0 )
|
transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 )
|
||||||
mesh = SubResource( 3 )
|
mesh = SubResource( 3 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
@ -50,4 +52,4 @@ material/0 = null
|
|||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="FrontRight/Area"]
|
[node name="CollisionShape" type="CollisionShape" parent="FrontRight/Area"]
|
||||||
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
||||||
shape = SubResource( 5 )
|
shape = SubResource( 6 )
|
||||||
|
@ -5,3 +5,4 @@ var bodyparts : Dictionary
|
|||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
bodyparts["Arm"] = load("res://BodyParts/Arm.tscn")
|
bodyparts["Arm"] = load("res://BodyParts/Arm.tscn")
|
||||||
|
|
||||||
|
@ -39,9 +39,11 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.02111, 0 )
|
|||||||
|
|
||||||
[node name="Arm" parent="Torso/FrontLeft" index="1" instance=ExtResource( 1 )]
|
[node name="Arm" parent="Torso/FrontLeft" index="1" instance=ExtResource( 1 )]
|
||||||
key = 83
|
key = 83
|
||||||
|
damage = 10.0
|
||||||
|
|
||||||
[node name="Arm" parent="Torso/FrontRight" index="1" instance=ExtResource( 1 )]
|
[node name="Arm" parent="Torso/FrontRight" index="1" instance=ExtResource( 1 )]
|
||||||
key = 65
|
key = 65
|
||||||
|
damage = 10.0
|
||||||
|
|
||||||
[node name="Torso2" parent="." instance=ExtResource( 3 )]
|
[node name="Torso2" parent="." instance=ExtResource( 3 )]
|
||||||
transform = Transform( -0.866025, -0.353553, -0.353553, -6.18172e-08, -0.707107, 0.707107, -0.5, 0.612372, 0.612372, 0, 3.02111, -9 )
|
transform = Transform( -0.866025, -0.353553, -0.353553, -6.18172e-08, -0.707107, 0.707107, -0.5, 0.612372, 0.612372, 0, 3.02111, -9 )
|
||||||
@ -49,9 +51,11 @@ player_id = 1
|
|||||||
|
|
||||||
[node name="Arm" parent="Torso2/FrontLeft" index="1" instance=ExtResource( 1 )]
|
[node name="Arm" parent="Torso2/FrontLeft" index="1" instance=ExtResource( 1 )]
|
||||||
key = 81
|
key = 81
|
||||||
|
damage = 10.0
|
||||||
|
|
||||||
[node name="Arm" parent="Torso2/FrontRight" index="1" instance=ExtResource( 1 )]
|
[node name="Arm" parent="Torso2/FrontRight" index="1" instance=ExtResource( 1 )]
|
||||||
key = 87
|
key = 87
|
||||||
|
damage = 10.0
|
||||||
|
|
||||||
[node name="UI" parent="." instance=ExtResource( 2 )]
|
[node name="UI" parent="." instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
@ -33,13 +33,12 @@ _global_script_class_icons={
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="BodyPartFighter"
|
config/name="BodyPartFighter"
|
||||||
run/main_scene="res://Ingame/Testing.tscn"
|
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
InGameState="*res://Global/InGameState.gd"
|
|
||||||
BodyPartLoader="*res://Global/BodyPartLoader.gd"
|
BodyPartLoader="*res://Global/BodyPartLoader.gd"
|
||||||
|
InGameState="*res://Global/InGameState.gd"
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user