Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
# Conflicts: # 3D Input/Bein_Mensch2.blend # 3D Input/Bein_Mensch2.blend1
This commit is contained in:
commit
def942a5be
Binary file not shown.
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, 7.8064 )
|
||||||
|
|
||||||
[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,29 @@ func _physics_process(delta):
|
|||||||
|
|
||||||
if _rayCast.is_colliding():
|
if _rayCast.is_colliding():
|
||||||
# collider will be the node hit
|
# collider will be the node hit
|
||||||
print(_rayCast.get_collider())
|
make_it_shine(false)
|
||||||
|
var temp = _rayCast.get_collider().get_parent()
|
||||||
|
if temp.has_node("OmniLight"):
|
||||||
|
_attachment_point = temp
|
||||||
|
make_it_shine(true)
|
||||||
|
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if event is InputEventMouseButton:
|
if _viewport.get_viewport().get_mouse_position().x >= 0:
|
||||||
if event.pressed and _viewport.get_viewport().get_mouse_position().x >= 0:
|
if event is InputEventMouseButton:
|
||||||
print("Mouse Click at: ", event.position)
|
if event.pressed:
|
||||||
_prev_mouse_pos = event.position
|
print("Mouse Click at: ", event.position)
|
||||||
_viewRot = true
|
_prev_mouse_pos = event.position
|
||||||
else:
|
_viewRot = true
|
||||||
print("mouse unpressed at: ", event.position)
|
else:
|
||||||
_viewRot = false
|
print("mouse unpressed at: ", event.position)
|
||||||
|
_viewRot = false
|
||||||
|
|
||||||
|
|
||||||
|
func body_part_chosen(params):
|
||||||
|
_attachment_point.add_child(BodyPartLoader.bodyparts[params].instance())
|
||||||
|
|
||||||
|
|
||||||
|
func make_it_shine(highlight : bool):
|
||||||
|
if _attachment_point != null:
|
||||||
|
_attachment_point.get_node("OmniLight").visible = highlight
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
[ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2]
|
[ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3]
|
[ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape" id=3]
|
[sub_resource type="CapsuleShape" id=1]
|
||||||
radius = 0.724339
|
radius = 0.724339
|
||||||
height = 5.27855
|
height = 5.27855
|
||||||
|
|
||||||
@ -13,28 +13,33 @@ radius = 0.591769
|
|||||||
|
|
||||||
[node name="Arm" instance=ExtResource( 1 )]
|
[node name="Arm" instance=ExtResource( 1 )]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
key = 0
|
||||||
|
damage = 10.0
|
||||||
|
|
||||||
[node name="PartCollider" parent="." index="0"]
|
[node name="PartCollider" parent="." index="0"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5.34203 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.83 )
|
||||||
shape = SubResource( 3 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="Mesh" parent="." index="1" instance=ExtResource( 2 )]
|
[node name="Mesh" parent="." index="1" instance=ExtResource( 2 )]
|
||||||
|
|
||||||
[node name="Sphere" parent="Mesh" index="0"]
|
[node name="Sphere" parent="Mesh" index="0"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="Armature" parent="Mesh" index="1"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||||
|
|
||||||
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
|
||||||
transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 )
|
transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 )
|
||||||
bone_name = "bone_2"
|
bone_name = "bone_2"
|
||||||
|
|
||||||
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
|
||||||
remote_path = NodePath("../../../../../TouchArea")
|
remote_path = NodePath("../../../../../TouchArea")
|
||||||
|
|
||||||
[node name="TouchArea" parent="." index="2"]
|
[node name="TouchArea" parent="." index="2"]
|
||||||
transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -7.60024 )
|
transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 )
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
|
||||||
transform = Transform( 1, 2.98291e-24, -1.98247e-23, -2.07684e-23, -9.49949e-08, -1, -6.50669e-24, 1, -9.49949e-08, 2.23781e-16, 0.399765, 0.00782054 )
|
transform = Transform( 1, 2.98291e-24, -1.98247e-23, -2.07684e-23, -9.49949e-08, -1, -6.50669e-24, 1, -9.49949e-08, 0, 0, 0 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[editable path="Mesh"]
|
[editable path="Mesh"]
|
||||||
|
26
BodyParts/BodyBase/AttachmentPoint.tscn
Normal file
26
BodyParts/BodyBase/AttachmentPoint.tscn
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="SphereMesh" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape" id=2]
|
||||||
|
|
||||||
|
[node name="AttachmentPoint" type="Spatial"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Mesh" type="MeshInstance" parent="."]
|
||||||
|
transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 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 )
|
||||||
|
visible = false
|
||||||
|
light_color = Color( 0.956863, 0.121569, 0.121569, 1 )
|
||||||
|
light_energy = 3.86
|
||||||
|
omni_range = 1.8
|
||||||
|
|
||||||
|
[node name="Area" type="Area" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="Area"]
|
||||||
|
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
|
||||||
|
shape = SubResource( 2 )
|
@ -1,20 +1,13 @@
|
|||||||
[gd_scene load_steps=7 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/BodyBase.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://BodyParts/BodyBase/AttachmentPoint.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
[sub_resource type="CapsuleMesh" id=1]
|
[sub_resource type="CapsuleMesh" id=1]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape" id=2]
|
[sub_resource type="CapsuleShape" id=2]
|
||||||
|
|
||||||
[sub_resource type="SphereMesh" id=3]
|
[node name="Torso" type="RigidBody"]
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=4]
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape" id=5]
|
|
||||||
|
|
||||||
[node name="Torso" type="RigidBody" groups=[
|
|
||||||
"Player",
|
|
||||||
]]
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="TorsoMesh" type="MeshInstance" parent="."]
|
[node name="TorsoMesh" type="MeshInstance" parent="."]
|
||||||
@ -22,32 +15,11 @@ 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" 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 )
|
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="FrontLeftAttachMent" type="MeshInstance" parent="FrontLeft"]
|
[node name="FrontRight" parent="." instance=ExtResource( 2 )]
|
||||||
transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 )
|
transform = Transform( -0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, -0.6, 0, 1 )
|
||||||
mesh = SubResource( 3 )
|
|
||||||
material/0 = null
|
|
||||||
|
|
||||||
[node name="Area" type="Area" parent="FrontLeft"]
|
|
||||||
|
|
||||||
[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 )
|
|
||||||
shape = SubResource( 4 )
|
|
||||||
|
|
||||||
[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 )
|
|
||||||
|
|
||||||
[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 )
|
|
||||||
mesh = SubResource( 3 )
|
|
||||||
material/0 = null
|
|
||||||
|
|
||||||
[node name="Area" type="Area" parent="FrontRight"]
|
|
||||||
|
|
||||||
[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 )
|
|
||||||
shape = SubResource( 5 )
|
|
||||||
|
49
Controllers/GameStateController.gd
Normal file
49
Controllers/GameStateController.gd
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
var _win_screen_scene
|
||||||
|
var _fighting_scene_path = "res://Ingame/Testing.tscn"
|
||||||
|
|
||||||
|
#test vars
|
||||||
|
var test = 0
|
||||||
|
var tested = false
|
||||||
|
signal player_win(player_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
_win_screen_scene = preload("res://UI/WinScreen.tscn").instance()
|
||||||
|
#_fighting_scene = preload("res://Ingame/Testing.tscn").instance()
|
||||||
|
|
||||||
|
connect("player_win", self, "_switch_to_win")
|
||||||
|
_win_screen_scene.connect("start_fight", self, "_switch_to_fighting")
|
||||||
|
|
||||||
|
|
||||||
|
func _switch_scene(scene):
|
||||||
|
#delete children
|
||||||
|
for child in get_children():
|
||||||
|
child.queue_free()
|
||||||
|
|
||||||
|
#append win scene
|
||||||
|
add_child(scene)
|
||||||
|
|
||||||
|
|
||||||
|
func _switch_to_win(player_id):
|
||||||
|
_switch_scene(_win_screen_scene)
|
||||||
|
|
||||||
|
#call win message in win scene
|
||||||
|
_win_screen_scene.set_win_message(player_id)
|
||||||
|
|
||||||
|
|
||||||
|
func _switch_to_fighting():
|
||||||
|
#_switch_scene(_fighting_scene)
|
||||||
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
|
|
||||||
|
# test
|
||||||
|
#func _process(delta):
|
||||||
|
#if test > 3 and not tested:
|
||||||
|
#tested = true
|
||||||
|
#test = 0
|
||||||
|
#emit_signal("player_win", 1)
|
||||||
|
#else:
|
||||||
|
#test += delta
|
9
Controllers/GameStateController.tscn
Normal file
9
Controllers/GameStateController.tscn
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Controllers/GameStateController.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://Ingame/Testing.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="GameStateController" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="InGame" parent="." instance=ExtResource( 2 )]
|
@ -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 )]
|
||||||
|
|
||||||
|
@ -10,28 +10,52 @@ __meta__ = {
|
|||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
labelPath = NodePath("MarginContainer/VBoxContainer/PlayerWon")
|
labelPath = NodePath("MarginContainer/VBoxContainer/PlayerWon")
|
||||||
|
continuePath = NodePath("MarginContainer/VBoxContainer/Control/Continue")
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 600.0
|
margin_bottom = 600.0
|
||||||
|
|
||||||
[node name="Congratz" type="Label" parent="MarginContainer/VBoxContainer"]
|
[node name="Congratz" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 249.0
|
margin_bottom = 250.0
|
||||||
rect_min_size = Vector2( 0, 250 )
|
rect_min_size = Vector2( 0, 250 )
|
||||||
text = "CONGRATULATIONS!"
|
text = "CONGRATULATIONS!"
|
||||||
align = 1
|
align = 1
|
||||||
valign = 2
|
valign = 2
|
||||||
|
|
||||||
[node name="PlayerWon" type="Label" parent="MarginContainer/VBoxContainer"]
|
[node name="PlayerWon" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
margin_top = 254.0
|
margin_top = 253.0
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 404.0
|
margin_bottom = 503.0
|
||||||
rect_min_size = Vector2( 0, 150 )
|
rect_min_size = Vector2( 0, 250 )
|
||||||
align = 1
|
align = 1
|
||||||
valign = 1
|
valign = 1
|
||||||
|
|
||||||
|
[node name="Control" type="Control" parent="MarginContainer/VBoxContainer"]
|
||||||
|
margin_top = 508.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 508.0
|
||||||
|
|
||||||
|
[node name="Continue" type="Button" parent="MarginContainer/VBoxContainer/Control"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -100.0
|
||||||
|
margin_top = -10.0
|
||||||
|
margin_right = 100.0
|
||||||
|
margin_bottom = 15.0
|
||||||
|
rect_min_size = Vector2( 200, 25 )
|
||||||
|
text = "Continue"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/Control/Continue" to="." method="_on_Continue_pressed"]
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
export(NodePath) var labelPath
|
export(NodePath) var labelPath
|
||||||
|
export(NodePath) var continuePath
|
||||||
|
|
||||||
#signal player_win(player_id)
|
signal start_fight()
|
||||||
|
|
||||||
var _playerWonLabel
|
var _playerWonLabel
|
||||||
|
var _continueButton
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
func _ready():
|
||||||
_playerWonLabel = get_node(labelPath) as Label
|
_playerWonLabel = get_node(labelPath) as Label
|
||||||
|
_continueButton = get_node(continuePath) as Label
|
||||||
#connect("player_win", self, "_win_message")
|
|
||||||
|
|
||||||
#emit_signal("player_win", 1)
|
|
||||||
|
|
||||||
|
|
||||||
func _win_message(player_id):
|
func set_win_message(player_id):
|
||||||
_playerWonLabel.text = "test"
|
_playerWonLabel.text = "Player " + str(player_id + 1) + " is victorious!"
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Continue_pressed():
|
||||||
|
print("test2")
|
||||||
|
|
||||||
#print("game won!")
|
emit_signal("start_fight")
|
||||||
#print(player_id)
|
|
||||||
|
@ -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