Started workin on DM loop, removed garbage from muzzle flash.

This commit is contained in:
unfa 2021-09-11 21:31:38 +02:00
parent aa29738472
commit 3864e0a9fa
3 changed files with 33 additions and 112 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=3 uid="uid://ikiqohjvlqni"]
[gd_scene load_steps=10 format=3 uid="uid://ikiqohjvlqni"]
[ext_resource type="Script" path="res://Assets/Weapons/Handgun/Flash.gd" id="1_ob70b"]
[ext_resource type="Texture2D" uid="uid://cguy76rs8e220" path="res://Assets/Effects/Flame.png" id="2_1simy"]
@ -7,48 +7,12 @@
length = 0.1
step = 0.025
tracks/0/type = "value"
tracks/0/path = NodePath("MeshInstance3D:mesh:surface_material_override/0:albedo_color")
tracks/0/path = NodePath("OmniLight3D:light_color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.025, 0.1),
"transitions": PackedFloat32Array(1, 0.420448, 1),
"update": 0,
"values": [Color(4, 4, 3, 1), Color(4, 2, 0.3, 1), Color(0, 0, 0, 1)]
}
tracks/1/type = "value"
tracks/1/path = NodePath("MeshInstance3D:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.025, 0.1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(-0.535305, 0.124179, 0), Vector3(-0.620616, 0.124179, 0), Vector3(-1.57472, 0.124179, 0)]
}
tracks/2/type = "value"
tracks/2/path = NodePath("MeshInstance3D:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.025, 0.1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(-0.336758, -0.0845939, -0.0845939), Vector3(-0.299894, -0.119659, -0.119659), Vector3(-0.197144, -0.00375807, -0.00375807)]
}
tracks/3/type = "value"
tracks/3/path = NodePath("OmniLight3D:light_color")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.025, 0.05, 0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
@ -57,23 +21,11 @@ tracks/3/keys = {
[sub_resource type="Animation" id="2"]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("MeshInstance3D:mesh:material:albedo_color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 1)]
}
[sub_resource type="Animation" id="3"]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("MeshInstance3D:mesh:material:albedo_color")
tracks/0/path = NodePath("OmniLight3D:light_color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
@ -82,60 +34,9 @@ tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(4, 2, 0.3, 1)]
}
tracks/1/type = "value"
tracks/1/path = NodePath("MeshInstance3D:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-0.620616, 0.124179, 0)]
}
tracks/2/type = "value"
tracks/2/path = NodePath("MeshInstance3D:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-0.299894, -0.119659, -0.119659)]
}
tracks/3/type = "value"
tracks/3/path = NodePath("OmniLight3D:light_color")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="StandardMaterial3D" id="4"]
blend_mode = 1
shading_mode = 0
albedo_color = Color(4, 2, 0.3, 1)
albedo_texture = ExtResource( "2_1simy" )
uv1_scale = Vector3(0.25, 0.25, 0.25)
uv1_offset = Vector3(0.25, 0.25, 0.25)
uv1_triplanar = true
proximity_fade_distance = 3.94
[sub_resource type="SphereMesh" id="5"]
material = SubResource( "4" )
radial_segments = 16
rings = 8
[sub_resource type="StandardMaterial3D" id="6"]
blend_mode = 1
shading_mode = 0
@ -169,13 +70,6 @@ anims/RESET = SubResource( "3" )
blend_times = []
script = null
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(-0.299894, 0, 0, 0, -0.119659, 0, 0, 0, -0.119659, -0.620616, 0.124179, 0)
visible = false
mesh = SubResource( "5" )
surface_material_override/0 = null
script = null
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
emitting = false
lifetime = 0.15

View file

@ -3,10 +3,11 @@ extends Node
enum GameFocus {MENU, GAME, CHAT, AWAY}
enum NetworkRole {NONE, CLIENT, SERVER, DEDICATED_SERVER, RELAY_SERVER}
const NET_PORT = 12597
#const NET_SERVER = "liblast.unfa.xyz"
const NET_SERVER = "localhost"
const NET_SERVER = "liblast.unfa.xyz"
#const NET_SERVER = "localhost"
var peer = ENetMultiplayerPeer.new()
@ -76,6 +77,8 @@ var uptime = 0 # seconds
const respawn_delay = 5 # seconds
var spawn_queue = {}
var game_score_limit = 15
func _process(delta):
uptime += delta
@ -166,11 +169,20 @@ func _input(_event) -> void:
focus = GameFocus.MENU
elif focus == GameFocus.MENU:
focus = GameFocus.GAME
#@remote func update_player_list(player_list):
# self.player_list = player_list
func game_over():
pass
func check_game_win_condition():
for i in player_list.players.keys():
if player_list.players[i].score >= game_score_limit:
chat.rpc(&'chat_notification', "Player " + player_list.players[i].name + " has won this round!")
#rpc(&'game_over', player_list.players[i].name)
game_over()
func update_hud():
hud.get_node("ScoreRank").text = "SCORE: " + str(player_list.get( get_tree().multiplayer.get_network_unique_id() ).score)

View file

@ -95,6 +95,21 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Panel" type="Panel" parent="."]
visible = false
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -309.5
offset_top = -157.5
offset_right = 309.5
offset_bottom = 157.5
script = null
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LightmapProbe" type="LightmapProbe" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 17, 0)
visible = false