merge
This commit is contained in:
commit
8a78b90265
BIN
3D Input/Fertige GLBs/Arm_Mensch.glb
Normal file
BIN
3D Input/Fertige GLBs/Arm_Mensch.glb
Normal file
Binary file not shown.
1062
3D Input/Fertige GLBs/Arm_Mensch.glb.import
Normal file
1062
3D Input/Fertige GLBs/Arm_Mensch.glb.import
Normal file
File diff suppressed because it is too large
Load Diff
1062
3D Input/Fertige GLBs/Bein_Mensch.glb.import
Normal file
1062
3D Input/Fertige GLBs/Bein_Mensch.glb.import
Normal file
File diff suppressed because it is too large
Load Diff
BIN
3D Input/Fertige GLBs/Handmaterial.material
Normal file
BIN
3D Input/Fertige GLBs/Handmaterial.material
Normal file
Binary file not shown.
1062
3D Input/Fertige GLBs/Kopf_Mensch.glb.import
Normal file
1062
3D Input/Fertige GLBs/Kopf_Mensch.glb.import
Normal file
File diff suppressed because it is too large
Load Diff
BIN
3D Input/Fertige GLBs/Kopfmaterial.material
Normal file
BIN
3D Input/Fertige GLBs/Kopfmaterial.material
Normal file
Binary file not shown.
34
3D Input/Kopftextur.png.import
Normal file
34
3D Input/Kopftextur.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Kopftextur.png-2e88b0ac35e3868e1464eb8d2273e145.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://3D Input/Kopftextur.png"
|
||||
dest_files=[ "res://.import/Kopftextur.png-2e88b0ac35e3868e1464eb8d2273e145.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
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,33 +2,35 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.stex"
|
||||
path.s3tc="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.s3tc.stex"
|
||||
path.etc2="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.etc2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://3D Input/beinimage.png"
|
||||
dest_files=[ "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.stex" ]
|
||||
dest_files=[ "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.s3tc.stex", "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
flags/srgb=1
|
||||
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
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
|
BIN
3D Input/gorilla hand unwrapped.blend
Normal file
BIN
3D Input/gorilla hand unwrapped.blend
Normal file
Binary file not shown.
BIN
3D Input/gorilla hand unwrapped.blend1
Normal file
BIN
3D Input/gorilla hand unwrapped.blend1
Normal file
Binary file not shown.
BIN
3D Input/handTextur.png
Normal file
BIN
3D Input/handTextur.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
36
3D Input/handTextur.png.import
Normal file
36
3D Input/handTextur.png.import
Normal file
@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/handTextur.png-033a3dd9ac9dc649dfe719b0dc401e9e.s3tc.stex"
|
||||
path.etc2="res://.import/handTextur.png-033a3dd9ac9dc649dfe719b0dc401e9e.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://3D Input/handTextur.png"
|
||||
dest_files=[ "res://.import/handTextur.png-033a3dd9ac9dc649dfe719b0dc401e9e.s3tc.stex", "res://.import/handTextur.png-033a3dd9ac9dc649dfe719b0dc401e9e.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
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=false
|
||||
svg/scale=1.0
|
BIN
3D Input/vogel_flügel unwrapped.blend
Normal file
BIN
3D Input/vogel_flügel unwrapped.blend
Normal file
Binary file not shown.
BIN
3D Input/vogel_flügel unwrapped.blend1
Normal file
BIN
3D Input/vogel_flügel unwrapped.blend1
Normal file
Binary file not shown.
@ -58,7 +58,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, 7.8064 )
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 17.1507 )
|
||||
|
||||
[node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"]
|
||||
enabled = true
|
||||
@ -66,8 +66,9 @@ collide_with_areas = true
|
||||
collide_with_bodies = false
|
||||
|
||||
[node name="Torso" parent="." instance=ExtResource( 1 )]
|
||||
[connection signal="pressed" from="GUI/HBoxC/VBoxC/Start" to="." method="_on_Button2_pressed"]
|
||||
|
||||
[node name="TorsoCollider" parent="Torso" index="0"]
|
||||
shape = null
|
||||
[connection signal="pressed" from="GUI/HBoxC/VBoxC/Start" to="." method="_on_Start_pressed"]
|
||||
|
||||
[editable path="Torso"]
|
||||
|
||||
[editable path="Torso/FrontLeft"]
|
||||
|
@ -17,12 +17,15 @@ var _viewport : Viewport
|
||||
|
||||
var _velx = 0
|
||||
var _vely = 0
|
||||
|
||||
var _attachment_point : Spatial
|
||||
|
||||
var _default_grav
|
||||
|
||||
signal start_fight()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
_default_grav = PhysicsServer.area_get_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY)
|
||||
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, 0)
|
||||
_torso = get_node(torsoPath) as RigidBody
|
||||
_camera = get_node(cameraPath) as Camera
|
||||
@ -78,9 +81,11 @@ func _input(event):
|
||||
if event is InputEventMouseButton:
|
||||
if event.pressed:
|
||||
if _viewport.get_viewport().get_mouse_position().x >= 0:
|
||||
if event.button_index == BUTTON_WHEEL_UP:
|
||||
if event.button_index == BUTTON_WHEEL_UP and _attachment_point != null:
|
||||
if _attachment_point.get_node("Limb") != null:
|
||||
_attachment_point.get_node("Limb").rotate_z(0.1)
|
||||
elif event.button_index == BUTTON_WHEEL_DOWN:
|
||||
elif event.button_index == BUTTON_WHEEL_DOWN and _attachment_point != null:
|
||||
if _attachment_point.get_node("Limb") != null:
|
||||
_attachment_point.get_node("Limb").rotate_z(-0.1)
|
||||
else:
|
||||
_prev_mouse_pos = event.position
|
||||
@ -115,3 +120,8 @@ func delete_body_part():
|
||||
if body_part != null:
|
||||
body_part.queue_free()
|
||||
|
||||
|
||||
func _on_Start_pressed():
|
||||
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, _default_grav)
|
||||
|
||||
emit_signal("start_fight")
|
||||
|
@ -7,12 +7,12 @@
|
||||
[node name="AttachmentPoint" type="Spatial"]
|
||||
|
||||
[node name="Mesh" type="MeshInstance" parent="."]
|
||||
transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 )
|
||||
transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0 )
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = null
|
||||
|
||||
[node name="OmniLight" type="OmniLight" parent="."]
|
||||
transform = Transform( 1, 3.12639e-13, -1.77715e-26, -3.12639e-13, 1, -5.68434e-14, 0, 5.68434e-14, 1, -0.680858, 0, -1.38872 )
|
||||
transform = Transform( 1, 3.12639e-13, -1.77715e-26, -3.12639e-13, 1, -5.68434e-14, 0, 5.68434e-14, 1, 0, 0, -1.5 )
|
||||
visible = false
|
||||
light_color = Color( 0.956863, 0.121569, 0.121569, 1 )
|
||||
light_energy = 3.86
|
||||
|
@ -1,32 +1,58 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1]
|
||||
[ext_resource path="res://BodyParts/BodyBase/AttachmentPoint.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://3D Input/Torso.glb" type="PackedScene" id=3]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id=1]
|
||||
|
||||
[sub_resource type="CapsuleShape" id=2]
|
||||
[sub_resource type="CapsuleShape" id=1]
|
||||
radius = 0.855929
|
||||
height = 1.48749
|
||||
|
||||
[node name="Torso" type="RigidBody" groups=[
|
||||
"Player",
|
||||
]]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="TorsoMesh" type="MeshInstance" parent="."]
|
||||
visible = false
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = null
|
||||
|
||||
[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 )
|
||||
transform = Transform( 2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="FrontLeft" parent="." instance=ExtResource( 2 )]
|
||||
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="DownFrontLeft" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( -0.965926, 0, -0.258819, 0, 1, 0, 0.258819, 0, -0.965926, 1.3, 1, 4.2 )
|
||||
|
||||
[node name="FrontRight" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 0.5, -7.54979e-08, 0.866025, -1.50996e-07, -1, 0, 0.866025, -1.30766e-07, -0.5, -0.6, 0, 1 )
|
||||
[node name="Mesh" parent="DownFrontLeft" index="0"]
|
||||
transform = Transform( 0.2, 0, 3.72529e-09, 0, 0.2, 0, -3.72529e-09, 0, 0.2, 0, 0, 0 )
|
||||
|
||||
[node name="DownFrontRight" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( -0.965926, 0, 0.258819, 0, 1, 0, -0.258819, 0, -0.965926, -1.3, 1, 4.2 )
|
||||
|
||||
[node name="OmniLight" parent="DownFrontRight" index="1"]
|
||||
transform = Transform( 1, 3.13083e-13, 0, -3.09641e-13, 1, -5.59552e-14, 0, 5.59552e-14, 1, -0.680858, -1.19209e-07, -1.38872 )
|
||||
|
||||
[node name="CollisionShape" parent="DownFrontRight/Area" index="0"]
|
||||
transform = Transform( 0.5, 1.4988e-15, 0, 1.4988e-15, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
||||
|
||||
[node name="DownBackRight" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 0.982402, -3.24601e-07, 0.0859489, -3.2133e-07, -1, 0, 0.0859489, -2.83989e-08, -0.982402, -1.9, -1, 3.6 )
|
||||
|
||||
[node name="DownBackLeft" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 0.982402, 3.24601e-07, -0.0859489, 3.2133e-07, -1, 0, -0.0859489, -2.83989e-08, -0.982402, 1.9, -1, 3.6 )
|
||||
|
||||
[node name="UpFrontLeft" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 0.103081, -3.40598e-08, -0.980752, -3.2133e-07, -1, 0, -0.980752, 3.24056e-07, -0.103081, 2.9, 0, -2 )
|
||||
|
||||
[node name="UpFrontRight" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 0.103081, 3.40598e-08, 0.980752, 3.2133e-07, -1, 0, 0.980752, 3.24056e-07, -0.103081, -2.9, 0, -2 )
|
||||
|
||||
[node name="UpBackRight" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( -0.870723, 0.384569, 0.26555, -1.84307e-07, -0.573576, 0.807811, 0.462972, 0.723268, 0.499426, -1, -1.9, -2.5 )
|
||||
|
||||
[node name="UpBackLeft" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( -0.870723, -0.384569, -0.26555, 1.84307e-07, -0.573576, 0.807811, -0.462972, 0.723268, 0.499426, 1, -1.9, -2.5 )
|
||||
|
||||
[node name="Torso" parent="." instance=ExtResource( 3 )]
|
||||
transform = Transform( 0.2, 0, 0, 0, -8.74228e-09, 0.2, 0, -0.2, -8.74228e-09, 0, 0, 0 )
|
||||
transform = Transform( 0.5, 0, 0, 0, -2.18557e-08, 0.5, 0, -0.5, -2.18557e-08, 0, 0, 0 )
|
||||
|
||||
[editable path="DownFrontLeft"]
|
||||
|
||||
[editable path="DownFrontRight"]
|
||||
|
20
BodyParts/HumanArm.gd
Normal file
20
BodyParts/HumanArm.gd
Normal file
@ -0,0 +1,20 @@
|
||||
extends PushingBodyPart
|
||||
|
||||
|
||||
onready var anim = get_node("Mesh/AnimationPlayer")
|
||||
|
||||
|
||||
func action():
|
||||
anim.play("ArmatureAction")
|
||||
|
||||
|
||||
func push(body):
|
||||
# We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
|
||||
var offset = transform.basis.xform(touch_area.global_transform.origin - base.global_transform.origin) * 0.1
|
||||
var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 5.0
|
||||
|
||||
base.apply_impulse(offset, direction)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta: float) -> void:
|
||||
# pass
|
43
BodyParts/HumanArm.tscn
Normal file
43
BodyParts/HumanArm.tscn
Normal file
@ -0,0 +1,43 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://BodyParts/PushingBodyPart.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://BodyParts/HumanArm.gd" type="Script" id=2]
|
||||
[ext_resource path="res://3D Input/Fertige GLBs/Arm_Mensch.glb" type="PackedScene" id=4]
|
||||
|
||||
[sub_resource type="BoxShape" id=1]
|
||||
extents = Vector3( 0.533899, 0.203146, 2.17243 )
|
||||
|
||||
[sub_resource type="SphereShape" id=2]
|
||||
radius = 0.125064
|
||||
|
||||
[node name="HumanArm" instance=ExtResource( 1 )]
|
||||
transform = Transform( -4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, 0, 0, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="PartCollider" parent="." index="0"]
|
||||
transform = Transform( 0.796097, 0, -0.605169, 0, 1, -3.55271e-15, 0.605169, 8.35188e-23, 0.796097, -0.894889, 1.42109e-14, -2.6182 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="TouchArea" parent="." index="1"]
|
||||
transform = Transform( -0.114995, 2.15415, 2.55188, -3.31495, -0.382831, 0.173782, 0.404395, -2.52562, 2.15021, -0.0333271, -0.131349, -3.878 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Mesh" parent="." index="2" instance=ExtResource( 4 )]
|
||||
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, -0.357728, -8.51476, 0 )
|
||||
|
||||
[node name="Skeleton" parent="Mesh/Armature" index="0"]
|
||||
bones/7/bound_children = [ NodePath("BoneAttachment") ]
|
||||
|
||||
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
||||
transform = Transform( 0.0638506, -0.727912, -0.682691, -0.242273, 0.652315, -0.718184, 0.968104, 0.211254, -0.134703, 0.0541456, 1.16231, 0.134369 )
|
||||
bone_name = "bone_6"
|
||||
|
||||
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
||||
remote_path = NodePath("../../../../../TouchArea")
|
||||
|
||||
[node name="AnimationPlayer" parent="Mesh" index="2"]
|
||||
playback_speed = 3.0
|
||||
|
||||
[editable path="Mesh"]
|
25
BodyParts/HumanLeg.gd
Normal file
25
BodyParts/HumanLeg.gd
Normal file
@ -0,0 +1,25 @@
|
||||
extends PushingBodyPart
|
||||
|
||||
|
||||
onready var anim = get_node("Mesh/AnimationPlayer")
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func action():
|
||||
anim.play("ArmatureAction")
|
||||
|
||||
|
||||
func push(body):
|
||||
# We multiply by 0.1 because we only want it to spin slightly, it should mostly go up
|
||||
var offset = transform.basis.xform(touch_area.global_transform.origin - base.global_transform.origin) * 0.1
|
||||
var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 5.0
|
||||
|
||||
base.apply_impulse(offset, direction)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta: float) -> void:
|
||||
# pass
|
45
BodyParts/HumanLeg.tscn
Normal file
45
BodyParts/HumanLeg.tscn
Normal file
@ -0,0 +1,45 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://BodyParts/PushingBodyPart.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://BodyParts/HumanLeg.gd" type="Script" id=2]
|
||||
[ext_resource path="res://3D Input/Fertige GLBs/Bein_Mensch.glb" type="PackedScene" id=3]
|
||||
[ext_resource path="res://3D Input/beinimage.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="BoxShape" id=1]
|
||||
extents = Vector3( 0.312908, 1.16904, 0.82381 )
|
||||
|
||||
[sub_resource type="SphereShape" id=2]
|
||||
radius = 0.108468
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=3]
|
||||
albedo_texture = ExtResource( 4 )
|
||||
|
||||
[node name="HumanLeg" instance=ExtResource( 1 )]
|
||||
transform = Transform( 1, 8.74228e-08, -3.82137e-15, 0, -4.37114e-08, -1, -8.74228e-08, 1, -4.37114e-08, 0, 0, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="PartCollider" parent="." index="0"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.77838, 0.0523456 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="TouchArea" parent="." index="1"]
|
||||
transform = Transform( 1.97878, 4.51195e-13, -2.27374e-13, -6.82121e-13, -0.277472, -1.95923, 7.89663e-14, 1.95923, -0.277471, -6.53699e-13, -2.74829, -0.692869 )
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Mesh" parent="." index="2" instance=ExtResource( 3 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.42109e-14, -2.28512, -0.0490953 )
|
||||
|
||||
[node name="Cube" parent="Mesh/Armature/Skeleton" index="0"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, -3.72529e-09, 0, 3.72529e-09, 1, 0, 0, 0 )
|
||||
material/0 = SubResource( 3 )
|
||||
|
||||
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
||||
transform = Transform( 1, 2.27374e-13, -1.13687e-13, 3.41061e-13, 0.0910855, 0.995843, -5.68434e-14, -0.995843, 0.0910852, -3.3393e-13, 1.43368, 0.260799 )
|
||||
bone_name = "bone_2"
|
||||
|
||||
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
||||
remote_path = NodePath("../../../../../TouchArea")
|
||||
|
||||
[editable path="Mesh"]
|
@ -1,14 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
[sub_resource type="BoxShape" id=2]
|
||||
|
||||
[node name="Torso" type="RigidBody"]
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = null
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||
shape = SubResource( 2 )
|
@ -1,41 +1,59 @@
|
||||
extends Node
|
||||
|
||||
var _win_screen_scene
|
||||
var _fighting_scene_path = "res://Ingame/Testing.tscn"
|
||||
var _fighting_scene
|
||||
const _body_build_path = "res://BodyConfig/bodyBuilderMenu.tscn"
|
||||
const _fighting_path = "res://Ingame/Testing.tscn"
|
||||
const _win_screen_path = "res://UI/WinScreen.tscn"
|
||||
|
||||
var _body_build_scene
|
||||
var _fighting_scene
|
||||
var _win_screen_scene
|
||||
|
||||
func _ready():
|
||||
_win_screen_scene = preload("res://UI/WinScreen.tscn").instance()
|
||||
_body_build_scene = preload("res://BodyConfig/bodyBuilderMenu.tscn").instance()
|
||||
_fighting_scene = preload("res://Ingame/Testing.tscn").instance()
|
||||
_prep_scene("body_build")
|
||||
_prep_scene("fight_scene")
|
||||
_prep_scene("win_screen")
|
||||
|
||||
InGameState.connect("player_win", self, "_switch_to_win")
|
||||
_switch_scene(_body_build_scene, "body_build")
|
||||
|
||||
|
||||
func _prep_scene(scene_name) -> Node:
|
||||
if scene_name == "body_build":
|
||||
_body_build_scene = preload(_body_build_path).instance()
|
||||
_body_build_scene.connect("start_fight", self, "_switch_to_fighting")
|
||||
return _body_build_scene
|
||||
elif scene_name == "fight_scene":
|
||||
_fighting_scene = preload(_fighting_path).instance()
|
||||
InGameState.connect("player_win", self, "_switch_to_win")
|
||||
return _fighting_scene
|
||||
elif scene_name == "win_screen":
|
||||
_win_screen_scene = preload(_win_screen_path).instance()
|
||||
_win_screen_scene.connect("build_body", self, "_switch_to_body_build")
|
||||
return _win_screen_scene
|
||||
return null
|
||||
|
||||
func _switch_scene(scene):
|
||||
func _switch_scene(scene, scene_name):
|
||||
#delete children
|
||||
for child in get_children():
|
||||
child.queue_free()
|
||||
|
||||
#append win scene
|
||||
add_child(scene)
|
||||
var new_scene = _prep_scene(scene_name)
|
||||
add_child(new_scene)
|
||||
|
||||
|
||||
func _switch_to_win(player_id):
|
||||
_switch_scene(_win_screen_scene)
|
||||
print("test win")
|
||||
|
||||
_switch_scene(_win_screen_scene, "win_screen")
|
||||
|
||||
#call win message in win scene
|
||||
_win_screen_scene.set_win_message(player_id)
|
||||
|
||||
|
||||
func _switch_to_fighting():
|
||||
print("oh fuck")
|
||||
|
||||
_switch_scene(_fighting_scene)
|
||||
#get_tree().reload_current_scene()
|
||||
_switch_scene(_fighting_scene, "fight_scene")
|
||||
|
||||
|
||||
func _switch_to_body_build():
|
||||
_switch_scene(_body_build_scene)
|
||||
_switch_scene(_body_build_scene, "body_build")
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Controllers/GameStateController.gd" type="Script" id=1]
|
||||
[ext_resource path="res://BodyConfig/bodyBuilderMenu.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="GameStateController" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Body Builder Menu" parent="." instance=ExtResource( 2 )]
|
||||
|
@ -5,4 +5,4 @@ var bodyparts : Dictionary
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
bodyparts["Arm"] = load("res://BodyParts/Arm.tscn")
|
||||
|
||||
bodyparts["Humanleg"] = load("res://BodyParts/HumanLeg.tscn")
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://BodyParts/Arm.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://UI/UI.tscn" type="PackedScene" id=2]
|
||||
@ -6,6 +6,7 @@
|
||||
[ext_resource path="res://Ingame/Ingame.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Ingame/Arena.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Ingame/CameraFocus.gd" type="Script" id=6]
|
||||
[ext_resource path="res://BodyParts/HumanLeg.tscn" type="PackedScene" id=7]
|
||||
|
||||
[node name="InGame" type="Spatial"]
|
||||
script = ExtResource( 4 )
|
||||
@ -17,20 +18,18 @@ script = ExtResource( 4 )
|
||||
[node name="Torso" parent="." instance=ExtResource( 3 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
|
||||
|
||||
[node name="Arm" parent="Torso/FrontLeft/Limb" index="0" instance=ExtResource( 1 )]
|
||||
key = 81
|
||||
|
||||
[node name="Arm" parent="Torso/FrontRight/Limb" index="0" instance=ExtResource( 1 )]
|
||||
key = 87
|
||||
|
||||
[node name="Torso2" parent="." instance=ExtResource( 3 )]
|
||||
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2, -10 )
|
||||
|
||||
[node name="Arm" parent="Torso2/FrontLeft/Limb" index="0" instance=ExtResource( 1 )]
|
||||
transform = Transform( 1, 2.84217e-14, 0, -2.84217e-14, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
key = 79
|
||||
[node name="HumanLeg" parent="Torso2/DownFrontLeft/Limb" index="0" instance=ExtResource( 7 )]
|
||||
|
||||
[node name="Arm" parent="Torso2/FrontRight/Limb" index="0" instance=ExtResource( 1 )]
|
||||
[node name="Arm" parent="Torso2/DownFrontRight/Limb" index="0" instance=ExtResource( 1 )]
|
||||
key = 83
|
||||
|
||||
[node name="Arm" parent="Torso2/DownBackRight/Limb" index="0" instance=ExtResource( 1 )]
|
||||
key = 81
|
||||
|
||||
[node name="Arm" parent="Torso2/DownBackLeft/Limb" index="0" instance=ExtResource( 1 )]
|
||||
key = 80
|
||||
|
||||
[node name="CameraFocus" type="Spatial" parent="."]
|
||||
@ -41,12 +40,12 @@ transform = Transform( -4.2222e-08, -0.707107, 0.707107, -1.13133e-08, 0.707107,
|
||||
|
||||
[editable path="Torso"]
|
||||
|
||||
[editable path="Torso/FrontLeft"]
|
||||
|
||||
[editable path="Torso/FrontRight"]
|
||||
|
||||
[editable path="Torso2"]
|
||||
|
||||
[editable path="Torso2/FrontLeft"]
|
||||
[editable path="Torso2/DownFrontLeft"]
|
||||
|
||||
[editable path="Torso2/FrontRight"]
|
||||
[editable path="Torso2/DownFrontRight"]
|
||||
|
||||
[editable path="Torso2/DownBackRight"]
|
||||
|
||||
[editable path="Torso2/DownBackLeft"]
|
||||
|
@ -7,15 +7,15 @@
|
||||
[ext_resource path="res://Resources/Styles/ButtonPressedStyle.tres" type="StyleBox" id=5]
|
||||
[ext_resource path="res://Resources/Styles/ButtonNormalStyle.tres" type="StyleBox" id=6]
|
||||
|
||||
[node name="Spatial" type="Control"]
|
||||
[node name="WinScreen" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
labelPath = NodePath("MarginContainer/VBoxContainer/PlayerWon")
|
||||
continuePath = NodePath("MarginContainer/VBoxContainer/Control/Continue")
|
||||
labelPath = NodePath("../WinScreen/MarginContainer/VBoxContainer/PlayerWon")
|
||||
continuePath = NodePath("../WinScreen/MarginContainer/VBoxContainer/Control/Continue")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
|
@ -18,6 +18,4 @@ func set_win_message(player_id):
|
||||
|
||||
|
||||
func _on_Continue_pressed():
|
||||
print("test2")
|
||||
|
||||
emit_signal("build_body")
|
||||
|
@ -43,4 +43,5 @@ InGameState="*res://Global/InGameState.gd"
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/shadows/filter_mode=2
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
Loading…
x
Reference in New Issue
Block a user