first lobby draft made, you can move a charcter around
This commit is contained in:
12
DoeEyedGirl/mat_doe_eyed_girl.tres
Normal file
12
DoeEyedGirl/mat_doe_eyed_girl.tres
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://8uj5v7wo0nu2"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_1kksn"]
|
||||
[ext_resource type="Texture2D" uid="uid://bvx0xurv0nwtq" path="res://DoeEyedGirl/tex_doe_eyed_girl.png" id="2_3bssb"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_1kksn")
|
||||
shader_parameter/albedo = ExtResource("2_3bssb")
|
||||
shader_parameter/jitter_z_coordinate = true
|
||||
shader_parameter/jitter_depth_independent = true
|
||||
shader_parameter/alpha_scissor = 1.0
|
||||
BIN
DoeEyedGirl/mdl_doe_eyed_girl.glb
Normal file
BIN
DoeEyedGirl/mdl_doe_eyed_girl.glb
Normal file
Binary file not shown.
50
DoeEyedGirl/mdl_doe_eyed_girl.glb.import
Normal file
50
DoeEyedGirl/mdl_doe_eyed_girl.glb.import
Normal file
@@ -0,0 +1,50 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bha5gaovnfrxp"
|
||||
path="res://.godot/imported/mdl_doe_eyed_girl.glb-8bafc3618b178d883864369deb9e3ea1.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://DoeEyedGirl/mdl_doe_eyed_girl.glb"
|
||||
dest_files=["res://.godot/imported/mdl_doe_eyed_girl.glb-8bafc3618b178d883864369deb9e3ea1.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=false
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material.027": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://DoeEyedGirl/mat_doe_eyed_girl.tres",
|
||||
"use_external/path": "uid://8uj5v7wo0nu2"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
8
DoeEyedGirl/scn_doe_eyed_girl.tscn
Normal file
8
DoeEyedGirl/scn_doe_eyed_girl.tscn
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://djx385r2csro4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bha5gaovnfrxp" path="res://DoeEyedGirl/mdl_doe_eyed_girl.glb" id="1_gun1t"]
|
||||
|
||||
[node name="Node3D" type="Node3D" unique_id=1269374108]
|
||||
|
||||
[node name="doe_girl" parent="." unique_id=1532649165 instance=ExtResource("1_gun1t")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0818636, 0)
|
||||
BIN
DoeEyedGirl/tex_doe_eyed_girl.png
Normal file
BIN
DoeEyedGirl/tex_doe_eyed_girl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
40
DoeEyedGirl/tex_doe_eyed_girl.png.import
Normal file
40
DoeEyedGirl/tex_doe_eyed_girl.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvx0xurv0nwtq"
|
||||
path="res://.godot/imported/tex_doe_eyed_girl.png-871861c38bf502af4839c079b6bb1308.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://DoeEyedGirl/tex_doe_eyed_girl.png"
|
||||
dest_files=["res://.godot/imported/tex_doe_eyed_girl.png-871861c38bf502af4839c079b6bb1308.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
25
Levels/Level1/testwave.tres
Normal file
25
Levels/Level1/testwave.tres
Normal file
@@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://bkcmdtfrhq43v"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3grc2j4bjrnw" path="res://enemy_group.gd" id="1_bojkk"]
|
||||
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="2_a2eo6"]
|
||||
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_ptt5n"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_crjd6"]
|
||||
script = ExtResource("1_bojkk")
|
||||
enemy = ExtResource("2_a2eo6")
|
||||
count = 40
|
||||
metadata/_custom_type_script = "uid://3grc2j4bjrnw"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_llpiq"]
|
||||
script = ExtResource("1_bojkk")
|
||||
enemy = ExtResource("2_a2eo6")
|
||||
count = 20
|
||||
metadata/_custom_type_script = "uid://3grc2j4bjrnw"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_ptt5n")
|
||||
enemy_groups = Dictionary[ExtResource("1_bojkk"), int]({
|
||||
SubResource("Resource_crjd6"): 0,
|
||||
SubResource("Resource_llpiq"): 0
|
||||
})
|
||||
metadata/_custom_type_script = "uid://bp6q371iypd06"
|
||||
@@ -14,7 +14,7 @@ signal placed_tower(tower: Tower)
|
||||
@export var right_hand: Node3D
|
||||
@export var edit_tool: PathEditTool
|
||||
@export var carding_tool: CardPlacingTool
|
||||
@export var sprite: EightDirectionSprite3D
|
||||
@export var model: Node3D
|
||||
@export var interaction_raycast: RayCast3D
|
||||
@export var draw_pile: Inventory
|
||||
@export var hand: Inventory
|
||||
@@ -117,7 +117,7 @@ func _ready() -> void:
|
||||
if is_multiplayer_authority():
|
||||
ears.make_current()
|
||||
camera.make_current()
|
||||
sprite.queue_free()
|
||||
model.queue_free()
|
||||
player_name_tag.queue_free()
|
||||
for card: Card in hero_class.deck:
|
||||
if game_manager and game_manager.card_gameplay:
|
||||
@@ -128,6 +128,7 @@ func _ready() -> void:
|
||||
camera.set_visible(false)
|
||||
gun_camera.set_visible(false)
|
||||
hud.set_visible(false)
|
||||
$PostFx.visible = false
|
||||
|
||||
for state: HeroState in editing_states:
|
||||
state.state_changed.connect(update_state)
|
||||
@@ -137,7 +138,7 @@ func _ready() -> void:
|
||||
|
||||
if weapons[equipped_weapon] != null:
|
||||
weapons[equipped_weapon].set_raycast_origin(camera)
|
||||
sprite.texture.atlas = hero_class.texture
|
||||
#TODO: ADD A LINE HERE THAT SETS THE MODEL MESH BASED ON THE PLAYERS CLASS
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://1fqpoegbdm6n" path="res://PCs/hero.gd" id="1_pihpe"]
|
||||
[ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://Classes/Engineer/class.tres" id="2_dbyo0"]
|
||||
[ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="2_ib0t5"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct6gic4shy5qw" path="res://wave_viewer.tscn" id="2_o55s8"]
|
||||
[ext_resource type="PackedScene" uid="uid://buvgdem68wtev" path="res://UI/Menus/PauseMenu/pause_menu.tscn" id="3_avnsx"]
|
||||
[ext_resource type="PackedScene" uid="uid://n8ab1cy7ordc" path="res://card_model/3d_card.tscn" id="4_2mqvj"]
|
||||
@@ -10,7 +9,6 @@
|
||||
[ext_resource type="PackedScene" uid="uid://gdd1xupf4oxx" path="res://UI/CardSelectionBox/card_selection_box.tscn" id="5_h82f6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dqt1ggtkpkuhs" path="res://PCs/PathEditTool/path_edit_tool.tscn" id="5_jlxb3"]
|
||||
[ext_resource type="Script" uid="uid://do24iuot0j7d7" path="res://Scripts/inventory.gd" id="6_cf5ap"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://Classes/Engineer/red.png" id="6_yyp8i"]
|
||||
[ext_resource type="Script" uid="uid://3wvxl8jo4uis" path="res://PCs/weapon_movement.gd" id="7_14ugt"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj2q72ch8nkek" path="res://card_placing_tool.tscn" id="8_7d213"]
|
||||
[ext_resource type="Script" uid="uid://b6kjrl7ae1mi0" path="res://PCs/hud.gd" id="8_yl6ka"]
|
||||
@@ -23,6 +21,7 @@
|
||||
[ext_resource type="Script" uid="uid://dkhl8u8p6gmlu" path="res://PCs/spring.gd" id="15_0ehim"]
|
||||
[ext_resource type="Texture2D" uid="uid://c60fh34ttgcvh" path="res://Assets/Textures/minimap_player.png" id="15_nhlam"]
|
||||
[ext_resource type="Texture2D" uid="uid://chhmkmlfrobhu" path="res://Enemies/Driftling/icon_driftling.png" id="15_q3yot"]
|
||||
[ext_resource type="PackedScene" uid="uid://djx385r2csro4" path="res://DoeEyedGirl/scn_doe_eyed_girl.tscn" id="16_0ehim"]
|
||||
[ext_resource type="Texture2D" uid="uid://cqnapc8cscl7i" path="res://Assets/Textures/border.png" id="16_x1xjr"]
|
||||
[ext_resource type="PackedScene" uid="uid://chnj376d3lcjd" path="res://UI/pickup_notification.tscn" id="17_oyeww"]
|
||||
[ext_resource type="Script" uid="uid://b5wle8f6rv3e7" path="res://PCs/player_movement.gd" id="20_cfhw8"]
|
||||
@@ -78,6 +77,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://hyyngwod6wke" path="res://Audio/MGWSoundDesign/DirtRoad_Mono_04.wav" id="70_sewk0"]
|
||||
[ext_resource type="AudioStream" uid="uid://b2p1egvjy6w1b" path="res://Audio/MGWSoundDesign/PavementTiles_Mono_05.wav" id="71_dx4x6"]
|
||||
[ext_resource type="AudioStream" uid="uid://dbpecjrivtwav" path="res://Audio/MGWSoundDesign/DirtRoad_Mono_05.wav" id="71_n0bvw"]
|
||||
[ext_resource type="Script" uid="uid://dbyaxum1l8dn4" path="res://network_puppeteer.gd" id="78_vkt85"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_o55s8"]
|
||||
animation = &"read"
|
||||
@@ -138,11 +138,6 @@ height = 1.8
|
||||
background_mode = 1
|
||||
background_color = Color(0.282353, 0.615686, 0.278431, 1)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vkt85"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("6_yyp8i")
|
||||
region = Rect2(0, 0, 96, 96)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_m3ots"]
|
||||
viewport_path = NodePath("NametagViewport")
|
||||
|
||||
@@ -158,14 +153,6 @@ viewport_path = NodePath("MiniMapViewport")
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_w13oc"]
|
||||
viewport_path = NodePath("CoinViewport")
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_tsiqi"]
|
||||
properties/0/path = NodePath(".:position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 2
|
||||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 2
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_wyb7c"]
|
||||
streams_count = 4
|
||||
stream_0/stream = ExtResource("24_8ch4w")
|
||||
@@ -232,7 +219,7 @@ stream_2/stream = ExtResource("69_c5gvc")
|
||||
stream_3/stream = ExtResource("70_sewk0")
|
||||
stream_4/stream = ExtResource("71_n0bvw")
|
||||
|
||||
[node name="Hero" type="CharacterBody3D" unique_id=1918171232 node_paths=PackedStringArray("subviewport1", "camera", "gun_camera", "left_hand", "right_hand", "edit_tool", "carding_tool", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "hud", "movement", "player_name_tag", "weapon_swap_timer", "editing_states", "fighting_state", "default_state", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio", "anim_tree", "anim_tree2", "weapon_pivot", "cassette", "left_hand_model", "gauntlet_model")]
|
||||
[node name="Hero" type="CharacterBody3D" unique_id=1918171232 node_paths=PackedStringArray("subviewport1", "camera", "gun_camera", "left_hand", "right_hand", "edit_tool", "carding_tool", "model", "interaction_raycast", "draw_pile", "hand", "discard_pile", "hud", "movement", "player_name_tag", "weapon_swap_timer", "editing_states", "fighting_state", "default_state", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio", "anim_tree", "anim_tree2", "weapon_pivot", "cassette", "left_hand_model", "gauntlet_model")]
|
||||
collision_layer = 2
|
||||
collision_mask = 37
|
||||
script = ExtResource("1_pihpe")
|
||||
@@ -245,7 +232,7 @@ left_hand = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand
|
||||
right_hand = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand")
|
||||
edit_tool = NodePath("SubViewport/Head/EditTool")
|
||||
carding_tool = NodePath("SubViewport/Head/CardPlacingTool")
|
||||
sprite = NodePath("EightDirectionSprite")
|
||||
model = NodePath("Model")
|
||||
interaction_raycast = NodePath("SubViewport/Head/RayCast3D")
|
||||
draw_pile = NodePath("DrawPile")
|
||||
hand = NodePath("Hand")
|
||||
@@ -422,6 +409,24 @@ collision_mask = 24
|
||||
[node name="CardPlacingTool" parent="SubViewport/Head" unique_id=1227455090 node_paths=PackedStringArray("hero") instance=ExtResource("8_7d213")]
|
||||
hero = NodePath("../../..")
|
||||
|
||||
[node name="Model" parent="." unique_id=1269374108 instance=ExtResource("16_0ehim")]
|
||||
|
||||
[node name="Skeleton3D" parent="Model/doe_girl/Armature" parent_id_path=PackedInt32Array(1269374108, 1532649165, 851796479) index="0" unique_id=24687068]
|
||||
bones/4/rotation = Quaternion(0.332303, -0.18204916, -0.5890503, 0.71375954)
|
||||
bones/5/rotation = Quaternion(-0.906193, -0.05188831, 0.023806162, 0.41899294)
|
||||
bones/7/rotation = Quaternion(-0.007778301, -0.004357032, -0.48717895, 0.8732566)
|
||||
bones/9/rotation = Quaternion(0.103601396, 0.0787555, -0.60002625, 0.78932434)
|
||||
bones/10/rotation = Quaternion(-0.35265866, -0.18703236, -0.4295865, 0.8100038)
|
||||
bones/11/rotation = Quaternion(-0.020328829, -0.007425959, -0.34303707, 0.9390725)
|
||||
bones/14/rotation = Quaternion(-0.39763534, -0.26168856, 0.626134, 0.61754483)
|
||||
bones/15/rotation = Quaternion(-0.2017903, 0.01537974, -0.038131464, 0.97856534)
|
||||
bones/16/rotation = Quaternion(-0.0048455084, 0.0038656965, 0.59440565, 0.8041415)
|
||||
bones/18/rotation = Quaternion(-0.22720158, 0.019839184, 0.4623247, 0.856879)
|
||||
bones/23/rotation = Quaternion(-0.045133278, -0.11772485, 0.9614003, -0.24456768)
|
||||
|
||||
[node name="AnimationPlayer" parent="Model/doe_girl" parent_id_path=PackedInt32Array(1269374108, 1532649165) index="1" unique_id=478945409]
|
||||
autoplay = &"HoldGun"
|
||||
|
||||
[node name="AudioListener3D" type="AudioListener3D" parent="." unique_id=1396328287]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
||||
|
||||
@@ -470,7 +475,7 @@ anchor = NodePath("../..")
|
||||
|
||||
[node name="NametagViewport" type="SubViewport" parent="." unique_id=1829906785]
|
||||
transparent_bg = true
|
||||
size = Vector2i(1000, 40)
|
||||
size = Vector2i(166, 21)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Label" type="Label" parent="NametagViewport" unique_id=1265368101]
|
||||
@@ -484,10 +489,6 @@ text = "xXx_TransgenderHyena_xXx"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="EightDirectionSprite" parent="." unique_id=438977751 instance=ExtResource("2_ib0t5")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0.915529, 0)
|
||||
texture = SubResource("AtlasTexture_vkt85")
|
||||
|
||||
[node name="MinimapIcon" type="Sprite3D" parent="." unique_id=1797025603]
|
||||
transform = Transform3D(4, 0, 0, 0, 0.0698095, 3.99939, 0, -3.99939, 0.0698095, 0, 2.86288, 0)
|
||||
layers = 4
|
||||
@@ -498,10 +499,11 @@ texture = ExtResource("15_nhlam")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
layers = 5
|
||||
sorting_offset = 500.0
|
||||
pixel_size = 0.002
|
||||
pixel_size = 0.005
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
texture_filter = 2
|
||||
texture = SubResource("ViewportTexture_m3ots")
|
||||
|
||||
[node name="Hand" type="Node" parent="." unique_id=326433039]
|
||||
@@ -1002,9 +1004,6 @@ expand_icon = true
|
||||
wait_time = 0.4
|
||||
one_shot = true
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="." unique_id=1897693906]
|
||||
replication_config = SubResource("SceneReplicationConfig_tsiqi")
|
||||
|
||||
[node name="PlaceCardAudio" type="AudioStreamPlayer" parent="." unique_id=1230517992]
|
||||
stream = SubResource("AudioStreamRandomizer_wyb7c")
|
||||
volume_db = -9.936
|
||||
@@ -1125,9 +1124,18 @@ bus = &"SFX"
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.43043494, 0)
|
||||
target_position = Vector3(0, -11.465, 0)
|
||||
|
||||
[node name="NetworkPuppeteer" type="Node" parent="." unique_id=1492136381 node_paths=PackedStringArray("player", "player_movement", "skeleton")]
|
||||
script = ExtResource("78_vkt85")
|
||||
player = NodePath("..")
|
||||
player_movement = NodePath("../PlayerMovement")
|
||||
skeleton = NodePath("../Model/doe_girl/Armature/Skeleton3D")
|
||||
metadata/_custom_type_script = "uid://dbyaxum1l8dn4"
|
||||
|
||||
[connection signal="timeout" from="WeaponSwapTimer" to="." method="_on_timer_timeout"]
|
||||
|
||||
[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet"]
|
||||
[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand"]
|
||||
[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Empty_001/cassette"]
|
||||
[editable path="Model"]
|
||||
[editable path="Model/doe_girl"]
|
||||
[editable path="CoinViewport/Coin"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://cwvprrvk4l2k0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvm4lyhx1uh0w" path="res://Scripts/multiplayer_lobby.gd" id="2_nb860"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpt3kpixawyby" path="res://UI/scoreboard.tscn" id="3_f6bia"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvfit0sy2tnw4" path="res://Scenes/Menus/server_form.tscn" id="5_bqbwv"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddmg342ff2qaq" path="res://UI/chatbox.tscn" id="6_wtqwd"]
|
||||
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://UI/drop_003.ogg" id="7_6mhre"]
|
||||
@@ -12,19 +11,21 @@ random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("7_6mhre")
|
||||
|
||||
[node name="multiplayer_lobby" type="Control" unique_id=473106326 node_paths=PackedStringArray("server_form", "chatbox", "audio_player")]
|
||||
[node name="multiplayer_lobby" type="Control" unique_id=473106326 node_paths=PackedStringArray("server_form", "audio_player")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("2_nb860")
|
||||
server_form = NodePath("ServerForm")
|
||||
character_select_screen = ExtResource("7_kawp7")
|
||||
chatbox = NodePath("Chatbox")
|
||||
audio_player = NodePath("AudioStreamPlayer")
|
||||
chatbox_scene = ExtResource("6_wtqwd")
|
||||
|
||||
[node name="ServerForm" parent="." unique_id=1466097634 instance=ExtResource("5_bqbwv")]
|
||||
layout_mode = 1
|
||||
@@ -33,44 +34,39 @@ offset_top = -112.0
|
||||
offset_right = 151.0
|
||||
offset_bottom = 112.0
|
||||
|
||||
[node name="Scoreboard" parent="." unique_id=1465394887 instance=ExtResource("3_f6bia")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -472.0
|
||||
offset_right = -50.0
|
||||
grow_horizontal = 0
|
||||
|
||||
[node name="ReadyButton" type="Button" parent="." unique_id=7189097]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -81.0
|
||||
offset_top = 311.0
|
||||
offset_right = -240.0
|
||||
offset_bottom = 19.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
text = "Ready"
|
||||
|
||||
[node name="Chatbox" parent="." unique_id=1790554118 instance=ExtResource("6_wtqwd")]
|
||||
layout_mode = 1
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1774735888]
|
||||
stream = SubResource("AudioStreamRandomizer_cwnde")
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="player_connected" from="." to="Scoreboard" method="add_player"]
|
||||
[connection signal="player_disconnected" from="." to="Scoreboard" method="remove_player"]
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1897046379]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -6.0
|
||||
offset_top = -6.0
|
||||
offset_right = 6.0
|
||||
offset_bottom = 6.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=2052048593]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FormTitle" type="Label" parent="PanelContainer/VBoxContainer" unique_id=626539239]
|
||||
layout_mode = 2
|
||||
text = "TITLE_PLAYER_LOBBY"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ReadyButton" type="Button" parent="PanelContainer/VBoxContainer" unique_id=7189097]
|
||||
layout_mode = 2
|
||||
text = "Ready"
|
||||
|
||||
[connection signal="connect_button_pressed" from="ServerForm" to="." method="connect_to_server"]
|
||||
[connection signal="connect_button_pressed" from="ServerForm" to="ServerForm" method="set_visible" binds= [false]]
|
||||
[connection signal="host_button_pressed" from="ServerForm" to="." method="create_server"]
|
||||
[connection signal="host_button_pressed" from="ServerForm" to="ServerForm" method="set_visible" binds= [false]]
|
||||
[connection signal="mouse_entered" from="ReadyButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="ReadyButton" to="." method="ready_player"]
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/ReadyButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/ReadyButton" to="." method="ready_player"]
|
||||
|
||||
@@ -9,7 +9,6 @@ streams_count = 1
|
||||
stream_0/stream = ExtResource("2_hirre")
|
||||
|
||||
[node name="ServerForm" type="PanelContainer" unique_id=1145091654 node_paths=PackedStringArray("ip_entry", "port_entry", "host_button", "join_button", "ip_field", "port_field", "players_field", "start_button")]
|
||||
custom_minimum_size = Vector2(500, 0)
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
|
||||
@@ -7,9 +7,11 @@ extends Resource
|
||||
@export var strength: float
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func attach_to_tower(tower_stats: CardText) -> void:
|
||||
pass
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func attach_to_weapon(weapon_stats: CardText) -> void:
|
||||
pass
|
||||
|
||||
@@ -278,6 +278,8 @@ func end_wave() -> void:
|
||||
Data.save_data.check_high_score(level_config.display_title, wave, starting_endless)
|
||||
for peer_id: int in connected_players_nodes:
|
||||
var player: Hero = connected_players_nodes[peer_id] as Hero
|
||||
if player.hud.enemy_count < 0:
|
||||
print(level_config.waves[wave - 2])
|
||||
player.hud.set_wave_count(wave)
|
||||
player.currency += ceili(pot / connected_players_nodes.size())
|
||||
player.currency += level_config.waves[wave - 2].bonus_cash
|
||||
|
||||
@@ -12,11 +12,13 @@ var loadout_editor: CharacterSelect = null
|
||||
var connected_players_profiles: Dictionary = {}
|
||||
var enet_peer: ENetMultiplayerPeer = ENetMultiplayerPeer.new()
|
||||
|
||||
|
||||
func setup_the_ui() -> void:
|
||||
chatbox = chatbox_scene.instantiate()
|
||||
game_manager.UILayer.add_child(chatbox)
|
||||
chatbox.set_visible(true)
|
||||
chatbox.game_manager = game_manager
|
||||
game_manager.chatbox = chatbox
|
||||
chatbox.anchor_bottom = 0.98
|
||||
chatbox.anchor_left = 0.02
|
||||
chatbox.anchor_top = 0.7
|
||||
|
||||
@@ -7,6 +7,9 @@ signal disconnected_from_server
|
||||
|
||||
@export var server_form: ServerForm
|
||||
|
||||
var player_ready_boxes: Dictionary[PlayerProfile, CheckBox]
|
||||
var player_character_selected_states: Dictionary[PlayerProfile, bool]
|
||||
|
||||
var alert_popup_scene: PackedScene = preload("res://Scenes/Menus/alert_popup.tscn")
|
||||
|
||||
|
||||
@@ -30,7 +33,10 @@ func _on_player_disconnected(peer_id: int) -> void:
|
||||
|
||||
|
||||
func _on_connection_succeeded() -> void:
|
||||
setup_game(multiplayer.get_unique_id())
|
||||
#setup_game(multiplayer.get_unique_id())
|
||||
connected_players_profiles[multiplayer.get_unique_id()] = Data.player_profile
|
||||
add_player_entry(Data.player_profile)
|
||||
$PanelContainer.visible = true
|
||||
|
||||
|
||||
func _on_connection_failed() -> void:
|
||||
@@ -48,22 +54,21 @@ func _on_server_disconnected() -> void:
|
||||
func create_server() -> void:
|
||||
enet_peer.create_server(server_form.port, server_form.max_players)
|
||||
multiplayer.multiplayer_peer = enet_peer
|
||||
setup_game(1)
|
||||
add_player_entry(Data.player_profile)
|
||||
connected_players_profiles[1] = Data.player_profile
|
||||
$PanelContainer.visible = true
|
||||
#setup_game(1)
|
||||
|
||||
|
||||
func setup_game(peer_id: int) -> void:
|
||||
func setup_game() -> void:
|
||||
loadout_editor = character_select_screen.instantiate() as CharacterSelect
|
||||
add_child(loadout_editor)
|
||||
player_disconnected.connect(game_manager.remove_player)
|
||||
#scoreboard.all_players_ready.connect(start_game)
|
||||
game_manager.chatbox = chatbox
|
||||
loadout_editor.hero_confirmed.connect(select_class)
|
||||
chatbox.username = Data.player_profile.display_name
|
||||
Data.player_profile.display_name_changed.connect(chatbox.change_username)
|
||||
loadout_editor.hero_selected.connect(Data.player_profile.set_preferred_class)
|
||||
loadout_editor.hero_selected.connect(edit_player_profile)
|
||||
connected_players_profiles[peer_id] = Data.player_profile
|
||||
player_connected.emit(peer_id, Data.player_profile)
|
||||
setup_the_ui()
|
||||
#loadout_editor.hero_selected.connect(Data.player_profile.set_preferred_class)
|
||||
#loadout_editor.hero_selected.connect(edit_player_profile)
|
||||
#player_connected.emit(peer_id, Data.player_profile)
|
||||
|
||||
|
||||
func connect_to_server() -> void:
|
||||
@@ -71,17 +76,70 @@ func connect_to_server() -> void:
|
||||
multiplayer.multiplayer_peer = enet_peer
|
||||
|
||||
|
||||
func ready_player() -> void:
|
||||
pass
|
||||
#var peer_id: int = multiplayer.get_unique_id()
|
||||
#networked_ready_player.rpc(peer_id)
|
||||
@rpc("any_peer", "reliable")
|
||||
func networked_ready_player(peer_id: int) -> void:
|
||||
player_ready_boxes[connected_players_profiles[peer_id]].button_pressed = true
|
||||
var start_game: bool = true
|
||||
for box: CheckBox in player_ready_boxes.values():
|
||||
if !box.button_pressed:
|
||||
start_game = false
|
||||
if start_game:
|
||||
setup_game()
|
||||
|
||||
|
||||
func ready_player(peer_id: int = multiplayer.get_unique_id()) -> void:
|
||||
networked_ready_player.rpc(peer_id)
|
||||
$PanelContainer/VBoxContainer/ReadyButton.visible = false
|
||||
player_ready_boxes[connected_players_profiles[peer_id]].button_pressed = true
|
||||
var start_game: bool = true
|
||||
for box: CheckBox in player_ready_boxes.values():
|
||||
if !box.button_pressed:
|
||||
start_game = false
|
||||
if start_game:
|
||||
setup_game()
|
||||
|
||||
|
||||
@rpc("any_peer", "reliable")
|
||||
func networked_select_class(peer_id: int) -> void:
|
||||
player_character_selected_states[connected_players_profiles[peer_id]] = true
|
||||
var start_game: bool = true
|
||||
for state: bool in player_character_selected_states.values():
|
||||
if !state:
|
||||
start_game = false
|
||||
if start_game:
|
||||
start_game()
|
||||
|
||||
|
||||
func select_class(peer_id: int = multiplayer.get_unique_id()) -> void:
|
||||
networked_select_class.rpc(peer_id)
|
||||
player_character_selected_states[connected_players_profiles[peer_id]] = true
|
||||
var start_game: bool = true
|
||||
for state: bool in player_character_selected_states.values():
|
||||
if !state:
|
||||
start_game = false
|
||||
if start_game:
|
||||
start_game()
|
||||
|
||||
|
||||
func start_game() -> void:
|
||||
enet_peer.refuse_new_connections = true
|
||||
visible = false
|
||||
super.start_game()
|
||||
|
||||
|
||||
func add_player_entry(profile: PlayerProfile) -> void:
|
||||
print("added player: " + str(profile.display_name))
|
||||
var entry: HBoxContainer = HBoxContainer.new()
|
||||
var label: Label = Label.new()
|
||||
var check: CheckBox = CheckBox.new()
|
||||
check.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
label.text = profile.display_name
|
||||
entry.add_child(label)
|
||||
entry.add_child(check)
|
||||
$PanelContainer/VBoxContainer.add_child(entry)
|
||||
player_ready_boxes[profile] = check
|
||||
|
||||
|
||||
#TODO: what the fuck is this doing lol
|
||||
func edit_player_profile(_argument: int) -> void:
|
||||
var profile_dict: Dictionary = Data.player_profile.to_dict()
|
||||
@@ -102,8 +160,4 @@ func add_player(new_player_profile_dict: Dictionary) -> void:
|
||||
chatbox.append_message("SERVER", Color.TOMATO, new_player_profile.display_name + " has connected!")
|
||||
connected_players_profiles[new_player_peer_id] = new_player_profile
|
||||
player_connected.emit(new_player_peer_id, new_player_profile)
|
||||
|
||||
|
||||
#@rpc("any_peer", "reliable", "call_local")
|
||||
#func networked_ready_player(peer_id: int) -> void:
|
||||
#scoreboard.set_player_ready_state(peer_id, true)
|
||||
add_player_entry(new_player_profile)
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
class_name Scoreboard
|
||||
extends PanelContainer
|
||||
|
||||
signal all_players_ready()
|
||||
|
||||
var entry_scene: PackedScene = preload("res://UI/scoreboard_entry.tscn")
|
||||
var entries: Dictionary = {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$VBoxContainer/DummyEntry1.queue_free()
|
||||
$VBoxContainer/DummyEntry2.queue_free()
|
||||
$VBoxContainer/DummyEntry3.queue_free()
|
||||
|
||||
|
||||
func get_player_entry(peer_id: int) -> ScoreboardEntry:
|
||||
return entries[peer_id]
|
||||
|
||||
|
||||
func set_player_ready_state(peer_id: int, state: bool) -> void:
|
||||
entries[peer_id].set_ready_state(state)
|
||||
for id: int in entries:
|
||||
if !entries[id].get_ready_state():
|
||||
return
|
||||
all_players_ready.emit()
|
||||
unready_all_players()
|
||||
|
||||
|
||||
func unready_all_players() -> void:
|
||||
for peer_id: int in entries:
|
||||
entries[peer_id].set_ready_state(false)
|
||||
|
||||
|
||||
func add_player(peer_id: int, player_profile: PlayerProfile) -> void:
|
||||
var entry: ScoreboardEntry = entry_scene.instantiate() as ScoreboardEntry
|
||||
entry.name = str(peer_id)
|
||||
entry.set_display_name("", player_profile.get_display_name())
|
||||
entry.set_character(0, player_profile.get_preferred_class())
|
||||
player_profile.display_name_changed.connect(entry.set_display_name)
|
||||
player_profile.preferred_class_changed.connect(entry.set_character)
|
||||
entries[peer_id] = entry
|
||||
$VBoxContainer.add_child(entry)
|
||||
|
||||
|
||||
func remove_player(peer_id: int) -> void:
|
||||
entries[peer_id].queue_free()
|
||||
entries.erase(peer_id)
|
||||
@@ -1 +0,0 @@
|
||||
uid://k0jvsnqw4766
|
||||
@@ -1,28 +0,0 @@
|
||||
class_name ScoreboardEntry
|
||||
extends HBoxContainer
|
||||
|
||||
var display_name: String
|
||||
var character: int
|
||||
var ready_state: bool
|
||||
|
||||
|
||||
func set_display_name(_old_name: String, new_name: String) -> void:
|
||||
display_name = new_name
|
||||
$DisplayName.text = new_name
|
||||
func get_display_name() -> String:
|
||||
return display_name
|
||||
|
||||
func set_character(_old_class: int, new_class: int) -> void:
|
||||
character = new_class
|
||||
$CharacterName.text = Data.characters[new_class].hero_name
|
||||
func get_character() -> int:
|
||||
return character
|
||||
|
||||
func set_ready_state(state: bool) -> void:
|
||||
ready_state = state
|
||||
if state:
|
||||
$TextureRect.texture.region = Rect2(32, 0, 32, 32)
|
||||
else:
|
||||
$TextureRect.texture.region = Rect2(0, 0, 32, 32)
|
||||
func get_ready_state() -> bool:
|
||||
return ready_state
|
||||
@@ -1 +0,0 @@
|
||||
uid://bmcym1lkp0j8f
|
||||
@@ -12,7 +12,6 @@ func setup_game() -> void:
|
||||
loadout_editor = character_select_screen.instantiate() as CharacterSelect
|
||||
loadout_editor.hero_confirmed.connect(start_game)
|
||||
add_child(loadout_editor)
|
||||
game_manager.chatbox = chatbox
|
||||
chatbox.username = Data.player_profile.display_name
|
||||
Data.player_profile.display_name_changed.connect(chatbox.change_username)
|
||||
loadout_editor.hero_selected.connect(Data.player_profile.set_preferred_class)
|
||||
|
||||
@@ -71,7 +71,7 @@ func aim() -> void:
|
||||
pitch_model.rotation.x = 0.0
|
||||
|
||||
|
||||
func shoot(count: int) -> void:
|
||||
func shoot(_count: int) -> void:
|
||||
if target_finder.targets.size() > 0 and affector:
|
||||
affector.apply_effect(effect, target_finder.targets)
|
||||
animator.play("shoot")
|
||||
|
||||
@@ -89,6 +89,7 @@ func start_game() -> void:
|
||||
if !gamemode.multiplayer:
|
||||
singleplayer_game_requested.emit()
|
||||
else:
|
||||
level_selected($PanelContainer.levels[0], 0)
|
||||
multiplayer_game_requested.emit()
|
||||
|
||||
|
||||
@@ -97,9 +98,28 @@ func _on_play_button_pressed() -> void:
|
||||
open_game_menu()
|
||||
|
||||
|
||||
|
||||
#TODO: Clearn this part up
|
||||
#TODO: new lobby system >>
|
||||
|
||||
#var lobby_panel: PanelContainer
|
||||
func _on_multiplayer_button_pressed() -> void:
|
||||
gamemode.multiplayer = true
|
||||
open_game_menu()
|
||||
start_game()
|
||||
#if !lobby_panel:
|
||||
#lobby_panel = PanelContainer.new()
|
||||
#add_child(lobby_panel)
|
||||
#lobby_panel.visible = true
|
||||
#lobby_panel.anchor_top = 0.1
|
||||
#lobby_panel.anchor_left = 0.3
|
||||
#lobby_panel.anchor_right = 0.7
|
||||
#lobby_panel.anchor_bottom = 0.9
|
||||
#gamemode.multiplayer = true
|
||||
#open_game_menu()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func open_game_menu() -> void:
|
||||
@@ -140,7 +160,7 @@ func level_selected(level: LevelConfig, side: int) -> void:
|
||||
level.allowed_cards = level.hero_class.deck
|
||||
level.waves = []
|
||||
game.level_config = level
|
||||
start_game()
|
||||
#start_game()
|
||||
|
||||
|
||||
func _on_standard_button_pressed() -> void:
|
||||
|
||||
@@ -81,6 +81,10 @@ alignment = 2
|
||||
layout_mode = 2
|
||||
text = "BUTTON_PLAY"
|
||||
|
||||
[node name="MulitplayerButton" type="Button" parent="MainControls" unique_id=1241426994]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MULTIPLAYER"
|
||||
|
||||
[node name="ModsButton" type="Button" parent="MainControls" unique_id=868836389]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_MODS"
|
||||
@@ -481,6 +485,8 @@ vertical_alignment = 1
|
||||
|
||||
[connection signal="mouse_entered" from="MainControls/PlayButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/MulitplayerButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/MulitplayerButton" to="." method="_on_multiplayer_button_pressed"]
|
||||
[connection signal="mouse_entered" from="MainControls/ModsButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="MainControls/ModsButton" to="." method="_on_mods_button_pressed"]
|
||||
[connection signal="pressed" from="MainControls/StatsButton" to="." method="_on_stats_button_pressed"]
|
||||
|
||||
@@ -203,6 +203,7 @@ size_flags_horizontal = 3
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="AlwaysShowShield/CenterContainer" unique_id=263220323]
|
||||
layout_mode = 2
|
||||
flat = true
|
||||
|
||||
[connection signal="item_selected" from="Resolution/HBoxContainer/OptionButton" to="." method="_on_option_button_item_selected"]
|
||||
[connection signal="value_changed" from="MouseSens/HBoxContainer/SpinBox" to="." method="_on_mouse_sens_spin_box_value_changed"]
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://dpt3kpixawyby"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://k0jvsnqw4766" path="res://Scripts/scoreboard.gd" id="1_b5vdp"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhri8mqjbme2t" path="res://UI/scoreboard_entry.tscn" id="2_uer0b"]
|
||||
|
||||
[node name="Scoreboard" type="PanelContainer" unique_id=1183254729]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -157.5
|
||||
offset_top = -125.0
|
||||
offset_right = 157.5
|
||||
offset_bottom = 125.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_b5vdp")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1349293636]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="DummyEntry1" parent="VBoxContainer" unique_id=556447686 instance=ExtResource("2_uer0b")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DummyEntry2" parent="VBoxContainer" unique_id=1104539259 instance=ExtResource("2_uer0b")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="DummyEntry3" parent="VBoxContainer" unique_id=1741907975 instance=ExtResource("2_uer0b")]
|
||||
layout_mode = 2
|
||||
@@ -1,35 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://bhri8mqjbme2t"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bmcym1lkp0j8f" path="res://Scripts/scoreboard_entry.gd" id="1_5xryr"]
|
||||
[ext_resource type="Texture2D" uid="uid://m4ehy5bahsup" path="res://Assets/Textures/ready.png" id="2_yxtr2"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qhkn8"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("2_yxtr2")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[node name="PlayerListEntry" type="HBoxContainer" unique_id=1099716284]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_5xryr")
|
||||
|
||||
[node name="DisplayName" type="Label" parent="." unique_id=651150806]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Dummy Player"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CharacterName" type="Label" parent="." unique_id=1148611618]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Character"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." unique_id=33110875]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
texture = SubResource("AtlasTexture_qhkn8")
|
||||
stretch_mode = 3
|
||||
2
main.gd
2
main.gd
@@ -67,6 +67,8 @@ func load_multiplayer() -> void:
|
||||
await loaded_scene
|
||||
var multi_player_lobby: MultiplayerLobby = scene.get_child(0) as MultiplayerLobby
|
||||
multi_player_lobby.game_manager = game_manager
|
||||
multi_player_lobby.setup_the_ui()
|
||||
multi_player_lobby.player_disconnected.connect(game_manager.remove_player)
|
||||
|
||||
|
||||
func load_scene(scene_path: String) -> void:
|
||||
|
||||
25
network_puppeteer.gd
Normal file
25
network_puppeteer.gd
Normal file
@@ -0,0 +1,25 @@
|
||||
class_name NetworkPuppeteer extends Node
|
||||
|
||||
@export var player: CharacterBody3D
|
||||
@export var player_movement: PlayerMovement
|
||||
@export var skeleton: Skeleton3D
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if is_multiplayer_authority():
|
||||
set_position.rpc(player.global_position)
|
||||
set_rotation.rpc(player_movement.head_angle, player.rotation.y)
|
||||
|
||||
|
||||
@rpc("unreliable", "call_remote")
|
||||
func set_position(position: Vector3) -> void:
|
||||
player.global_position = position
|
||||
|
||||
|
||||
@rpc("unreliable", "call_remote")
|
||||
func set_rotation(x: float, y: float) -> void:
|
||||
player_movement.head_angle = x
|
||||
player.rotation.y = y
|
||||
var bone: int = skeleton.find_bone("Head")
|
||||
var pos: Quaternion = skeleton.get_bone_pose_rotation(bone)
|
||||
skeleton.set_bone_pose_rotation(bone, Quaternion.from_euler(Vector3(x, 0, 0)))
|
||||
1
network_puppeteer.gd.uid
Normal file
1
network_puppeteer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dbyaxum1l8dn4
|
||||
Reference in New Issue
Block a user