From 7564a2c32d5685c24068a639e8bb10b7bcb49dd0 Mon Sep 17 00:00:00 2001 From: unfa Date: Tue, 22 Jun 2021 13:44:28 +0200 Subject: [PATCH] Temporarily disabled focus in PlayerInfo --- Game/Assets/Characters/Player.gd | 6 +++--- Game/Assets/HUD/Chat.gd | 1 + Game/Assets/Weapons/Weapon.tscn | 15 +++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Game/Assets/Characters/Player.gd b/Game/Assets/Characters/Player.gd index 39a6e18..14c6cd1 100644 --- a/Game/Assets/Characters/Player.gd +++ b/Game/Assets/Characters/Player.gd @@ -29,20 +29,20 @@ class PlayerInfo: var name: String var team: int var color: Color - var is_typing: bool + var focus: int #"res://Main.gd".GameFocus.GAME func _init(name: String, team: int, color: Color): self.name = name self.team = team self.color = color - self.is_typing = false + self.focus = 0 #false func serialize(): return { 'name': self.name, 'team': str(self.team), 'color': self.color.to_html(), - 'is_typing': self.is_typing, + 'focus': self.focus, } var input_active = false diff --git a/Game/Assets/HUD/Chat.gd b/Game/Assets/HUD/Chat.gd index 988a8d4..8c3e429 100644 --- a/Game/Assets/HUD/Chat.gd +++ b/Game/Assets/HUD/Chat.gd @@ -56,6 +56,7 @@ func _unhandled_input(_event) -> void: @remotesync func chat_message(sender_id: int, recipient_team, message: String) -> void: var sender_info = main.get_node("Players").get_node(str(sender_id)).player_info + chat_history.append_bbcode('\n' + '[b][color=' + sender_info.color.to_html() +']' + str(sender_info.name) + '[/color][/b] : [i]' + message + '[/i]') func _on_LineEdit_text_entered(new_text): diff --git a/Game/Assets/Weapons/Weapon.tscn b/Game/Assets/Weapons/Weapon.tscn index 2064b97..0b1365e 100644 --- a/Game/Assets/Weapons/Weapon.tscn +++ b/Game/Assets/Weapons/Weapon.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://Assets/Weapons/Handgun/Handgun.gltf" type="PackedScene" id=1] [ext_resource path="res://Assets/Weapons/Weapon.gd" type="Script" id=2] -[ext_resource path="res://Assets/Effects/Flame.png" type="Texture2D" id=3] [sub_resource type="Gradient" id=1] offsets = PackedFloat32Array( 0.00362319, 0.148551, 0.34058, 0.630435, 1 ) @@ -13,7 +12,7 @@ gradient = SubResource( 1 ) width = 64 [sub_resource type="Curve" id=3] -_data = [ Vector2( 0, 0 ), 0.0, 9.39008, 0, 0, Vector2( 0.120401, 0.645455 ), 0.649118, 0.649118, 0, 0, Vector2( 1, 0.990909 ), -0.0393939, 0.0, 0, 0 ] +_data = [ Vector2( 0, 0 ), 0.0, 9.39008, 0, 0, Vector2( 0.0844156, 0.972727 ), 0.649118, 0.649118, 0, 0, Vector2( 1, 0 ), -0.0393939, 0.0, 0, 0 ] [sub_resource type="CurveTexture" id=4] curve = SubResource( 3 ) @@ -24,9 +23,11 @@ particle_flag_rotate_y = true direction = Vector3( -1, 0, 0 ) spread = 0.0 gravity = Vector3( 0, 0, 0 ) -initial_velocity = 16.0 +initial_velocity = 50.0 initial_velocity_random = 0.9 -angular_velocity = 15.0 +angular_velocity = 1.0 +angular_velocity_random = 1.0 +damping = 8.0 angle = 360.0 angle_random = 1.0 scale_random = 0.2 @@ -41,7 +42,6 @@ blend_mode = 1 shading_mode = 0 vertex_color_use_as_albedo = true albedo_color = Color( 1, 1, 1, 0.196078 ) -albedo_texture = ExtResource( 3 ) billboard_mode = 3 particles_anim_h_frames = 2 particles_anim_v_frames = 2 @@ -49,7 +49,7 @@ particles_anim_loop = false [sub_resource type="QuadMesh" id=7] material = SubResource( 6 ) -size = Vector2( 0.6, 0.6 ) +size = Vector2( 0.3, 0.3 ) [node name="Weapon" type="Node3D"] script = ExtResource( 2 ) @@ -65,7 +65,6 @@ script = null [node name="Particles" type="GPUParticles3D" parent="Flash"] transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.340809, 0.124171, 0 ) emitting = false -amount = 16 lifetime = 0.15 one_shot = true explosiveness = 1.0