Changed damage API. Added "bleeding eyes" effect to indicate damage.
parent
0e600101c3
commit
6aef66c0a8
|
@ -280,10 +280,23 @@ func _process(delta):
|
|||
var anims = ["01", "02", "03", "04"]
|
||||
$Pain.play(anims[randi() % 4])
|
||||
|
||||
func damage(hp: int):
|
||||
var target = main.player_list.players[self.get_multiplayer_authority()]
|
||||
target.health -= hp
|
||||
@rpc(call_local, any_peer, reliable) func _damage(hp: int):
|
||||
if is_multiplayer_authority():
|
||||
hud.damage(hp)
|
||||
|
||||
|
||||
|
||||
#moan()
|
||||
|
||||
@rpc(call_local, any_peer, reliable) func take_damage(attacker, hit_position: Vector3, hit_normal: Vector3, damage:int, source_position: Vector3, damage_type, push: float):
|
||||
if is_multiplayer_authority():
|
||||
print("Taken damage: ", damage, " by: ", attacker, " from: ", source_position)
|
||||
hud.damage(damage)
|
||||
main.player_list.players[self.get_multiplayer_authority()].health -= damage # reduce health
|
||||
main.push_local_player_info()
|
||||
|
||||
print("Got some damage, but I'm just a puppet so whatever!")
|
||||
|
||||
@rpc(any_peer, call_local, reliable) func die(killer_pid: int):
|
||||
var gibs = gibs_vfx.instantiate()
|
||||
get_tree().root.add_child(gibs)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
extends Node
|
||||
|
||||
enum DamageType {
|
||||
NONE,
|
||||
BULLET,
|
||||
EXPLOSION,
|
||||
ENVIRONMENT_HAZARD,
|
||||
}
|
||||
|
||||
#enum MaterialType { NONE,
|
||||
# CONCRETE,
|
||||
# METAL,
|
||||
# WOOD,
|
||||
# GLASS,
|
||||
# WATER,
|
||||
# }
|
|
@ -2,6 +2,12 @@ extends Control
|
|||
|
||||
@onready var main = get_tree().get_root().get_node("Main")
|
||||
|
||||
var pain: float = 0:
|
||||
set(value):
|
||||
$Damage/EyeBleed.material.set('shader_param/Damage', value)
|
||||
get:
|
||||
return $Damage/EyeBleed.material.get('shader_param/Damage')
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
@ -13,6 +19,10 @@ func _ready():
|
|||
func game_over(winner):
|
||||
scoretab(true, winner)
|
||||
|
||||
func damage(hp):
|
||||
print("HUD damage ", hp)
|
||||
pain += hp/20
|
||||
|
||||
func update_scoretab():
|
||||
$ScoreTable/VBoxContainer/ScoreTab.text = ''
|
||||
|
||||
|
@ -61,3 +71,5 @@ func _process(delta):
|
|||
|
||||
if $ScoreTable.visible: # update the scores every frame when player is watching the score table
|
||||
update_scoretab()
|
||||
|
||||
pain *= 1 - delta
|
||||
|
|
|
@ -0,0 +1,192 @@
|
|||
[gd_resource type="VisualShader" load_steps=15 format=3 uid="uid://bet2pthddt01v"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_6ihsi"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_4sg8c"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_cq3b8"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_ibeng"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_64m16"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Depth"
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_1syv6"]
|
||||
default_input_values = [0, 0.0, 1, 0.0, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_gmj03"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Damage"
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_g75xc"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_awhie"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
constant = Color(1, 0.118141, 0, 1)
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_hcnqy"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
input_name = "uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_c1wnt"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, Vector3(0, 0, 0)]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_4gtfo"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_bp0gw"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_wvp6b"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[resource]
|
||||
resource_local_to_scene = true
|
||||
code = "shader_type canvas_item;
|
||||
render_mode skip_vertex_transform, unshaded;
|
||||
|
||||
uniform float Damage;
|
||||
uniform float Depth;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// ColorConstant:18
|
||||
vec3 n_out18p0 = vec3(1.000000, 0.118141, 0.000000);
|
||||
float n_out18p1 = 1.000000;
|
||||
|
||||
|
||||
// FloatUniform:16
|
||||
float n_out16p0 = Damage;
|
||||
|
||||
|
||||
// FloatUniform:14
|
||||
float n_out14p0 = Depth;
|
||||
|
||||
|
||||
// Input:2
|
||||
vec3 n_out2p0 = vec3(UV, 0.0);
|
||||
|
||||
|
||||
// VectorDecompose:4
|
||||
float n_out4p0 = n_out2p0.x;
|
||||
float n_out4p1 = n_out2p0.y;
|
||||
float n_out4p2 = n_out2p0.z;
|
||||
|
||||
|
||||
// FloatFunc:10
|
||||
float n_out10p0 = 1.0 - n_out4p0;
|
||||
|
||||
|
||||
// FloatOp:11
|
||||
float n_out11p0 = min(n_out10p0, n_out4p0);
|
||||
|
||||
|
||||
// SmoothStep:12
|
||||
float n_in12p0 = -0.25000;
|
||||
float n_out12p0 = smoothstep(n_in12p0, n_out14p0, n_out11p0);
|
||||
|
||||
|
||||
// FloatFunc:8
|
||||
float n_out8p0 = 1.0 - n_out4p1;
|
||||
|
||||
|
||||
// FloatOp:9
|
||||
float n_out9p0 = min(n_out8p0, n_out4p1);
|
||||
|
||||
|
||||
// SmoothStep:7
|
||||
float n_in7p0 = -0.25000;
|
||||
float n_out7p0 = smoothstep(n_in7p0, n_out14p0, n_out9p0);
|
||||
|
||||
|
||||
// FloatOp:13
|
||||
float n_out13p0 = n_out12p0 * n_out7p0;
|
||||
|
||||
|
||||
// SmoothStep:15
|
||||
float n_in15p0 = 0.00000;
|
||||
float n_out15p0 = smoothstep(n_in15p0, n_out16p0, n_out13p0);
|
||||
|
||||
|
||||
// FloatFunc:17
|
||||
float n_out17p0 = 1.0 - n_out15p0;
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out18p0;
|
||||
COLOR.a = n_out17p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(1260.12, -538.301)
|
||||
engine_version = {
|
||||
"major": 4,
|
||||
"minor": 0
|
||||
}
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
flags/skip_vertex_transform = true
|
||||
flags/unshaded = true
|
||||
nodes/fragment/0/position = Vector2(2200, -240)
|
||||
nodes/fragment/2/node = SubResource( "VisualShaderNodeInput_hcnqy" )
|
||||
nodes/fragment/2/position = Vector2(-800, 20)
|
||||
nodes/fragment/4/node = SubResource( "VisualShaderNodeVectorDecompose_c1wnt" )
|
||||
nodes/fragment/4/position = Vector2(-640, 40)
|
||||
nodes/fragment/7/node = SubResource( "VisualShaderNodeSmoothStep_4gtfo" )
|
||||
nodes/fragment/7/position = Vector2(500, 80)
|
||||
nodes/fragment/8/node = SubResource( "VisualShaderNodeFloatFunc_bp0gw" )
|
||||
nodes/fragment/8/position = Vector2(-340, 40)
|
||||
nodes/fragment/9/node = SubResource( "VisualShaderNodeFloatOp_wvp6b" )
|
||||
nodes/fragment/9/position = Vector2(-120, 120)
|
||||
nodes/fragment/10/node = SubResource( "VisualShaderNodeFloatFunc_6ihsi" )
|
||||
nodes/fragment/10/position = Vector2(-320, -220)
|
||||
nodes/fragment/11/node = SubResource( "VisualShaderNodeFloatOp_4sg8c" )
|
||||
nodes/fragment/11/position = Vector2(-80, -180)
|
||||
nodes/fragment/12/node = SubResource( "VisualShaderNodeSmoothStep_cq3b8" )
|
||||
nodes/fragment/12/position = Vector2(420, -240)
|
||||
nodes/fragment/13/node = SubResource( "VisualShaderNodeFloatOp_ibeng" )
|
||||
nodes/fragment/13/position = Vector2(920, -120)
|
||||
nodes/fragment/14/node = SubResource( "VisualShaderNodeFloatUniform_64m16" )
|
||||
nodes/fragment/14/position = Vector2(-200, -440)
|
||||
nodes/fragment/15/node = SubResource( "VisualShaderNodeSmoothStep_1syv6" )
|
||||
nodes/fragment/15/position = Vector2(1320, -240)
|
||||
nodes/fragment/16/node = SubResource( "VisualShaderNodeFloatUniform_gmj03" )
|
||||
nodes/fragment/16/position = Vector2(720, -540)
|
||||
nodes/fragment/17/node = SubResource( "VisualShaderNodeFloatFunc_g75xc" )
|
||||
nodes/fragment/17/position = Vector2(1592.12, -100.301)
|
||||
nodes/fragment/18/node = SubResource( "VisualShaderNodeColorConstant_awhie" )
|
||||
nodes/fragment/18/position = Vector2(1600, -400)
|
||||
nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 9, 0, 9, 0, 7, 2, 10, 0, 11, 0, 4, 1, 8, 0, 4, 1, 9, 1, 4, 0, 10, 0, 4, 0, 11, 1, 11, 0, 12, 2, 12, 0, 13, 0, 7, 0, 13, 1, 14, 0, 12, 1, 14, 0, 7, 1, 13, 0, 15, 2, 16, 0, 15, 1, 15, 0, 17, 0, 17, 0, 0, 1, 18, 0, 0, 0)
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=20 format=3 uid="uid://bff5uslrxesjx"]
|
||||
[gd_scene load_steps=22 format=3 uid="uid://bff5uslrxesjx"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://blnjjtjifk22i" path="res://Assets/HUD/Vignette.png" id="1"]
|
||||
[ext_resource type="Script" path="res://Assets/HUD/HUD.gd" id="1_wc430"]
|
||||
[ext_resource type="Shader" uid="uid://bet2pthddt01v" path="res://Assets/HUD/HUD.tres" id="2_djyym"]
|
||||
[ext_resource type="Texture2D" uid="uid://dim1jrwuiy4qt" path="res://Assets/HUD/Crosshair Baseline.png" id="3_r05jh"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0p7vfc62t5sb" path="res://Assets/HUD/Crosshair Hit.png" id="4_guqkl"]
|
||||
[ext_resource type="AudioStream" uid="uid://dfcyohpsqvri1" path="res://Assets/SFX/HUD_Confirm_Hit.wav" id="4_llqcq"]
|
||||
|
@ -15,6 +16,12 @@
|
|||
[ext_resource type="Texture2D" uid="uid://dvt25wji1pdyl" path="res://Assets/HUD/BarOver.svg" id="10_5i332"]
|
||||
[ext_resource type="Texture2D" uid="uid://0j6rxd7ncmu1" path="res://Assets/HUD/BarProgress.svg" id="11_tlgqu"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dxk5q"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource( "2_djyym" )
|
||||
shader_param/Damage = 0.0
|
||||
shader_param/Depth = 0.33
|
||||
|
||||
[sub_resource type="Animation" id="1"]
|
||||
resource_name = "Default"
|
||||
length = 0.1
|
||||
|
@ -116,6 +123,23 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Damage" type="Control" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="EyeBleed" type="ColorRect" parent="Damage"]
|
||||
material = SubResource( "ShaderMaterial_dxk5q" )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Crosshair" type="Control" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://dkjl1nltj2lms"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Materials/ExtendedMaterials/ExtendedMaterial.gd" id="1_ooagg"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( "1_ooagg" )
|
|
@ -0,0 +1,19 @@
|
|||
extends StandardMaterial3D
|
||||
class_name ExtendedMaterial
|
||||
|
||||
#const WEAPON = preload('res://Assets/Weapons/Weapon.gd').DamageType
|
||||
#@export var type : MaterialType = MaterialType.NONE
|
||||
|
||||
@export var type : Resource
|
||||
#func get_damage_effect(damage_type: WEAPON.DamageType):
|
||||
#
|
||||
# match type:
|
||||
# MaterialType.CONCRETE:
|
||||
# match damage_type:
|
||||
# WEAPON.DamageType.BULLET: return "bullet hitting concrete"
|
||||
# WEAPON.DamageType.EXPLOSION: return "explosion hitting concrete"
|
||||
# MaterialType.METAL:
|
||||
# match damage_type:
|
||||
# WEAPON.DamageType.BULLET: return "bullet hitting concrete"
|
||||
# WEAPON.DamageType.EXPLOSION: return "explosion hitting concrete"
|
||||
#
|
|
@ -0,0 +1,6 @@
|
|||
extends Resource
|
||||
class_name ExtendedMaterialDamageEffect
|
||||
|
||||
@export var particle_effect: PackedScene
|
||||
@export var sound_effect: PackedScene
|
||||
@export var decal: PackedScene
|
|
@ -0,0 +1,5 @@
|
|||
extends Resource
|
||||
class_name ExtendedMaterialType
|
||||
|
||||
@export var damage_effect: Resource
|
||||
@export var footstep_sound: AudioStream # TODO extend this with a custom resource holding a collection of sounds
|
|
@ -59,13 +59,25 @@ var spread = spread_min
|
|||
casing_instance.angular_velocity.y += randf_range(-10, 10)
|
||||
casing_instance.angular_velocity.x += randf_range(-10, 10)
|
||||
|
||||
pass
|
||||
|
||||
if is_multiplayer_authority(): # only do this on the attacker's local instance of the game
|
||||
give_damage(ray['collider'], ray['position'], ray['normal'], 20, self.global_transform.origin, Globals.DamageType.BULLET, 1.0)
|
||||
|
||||
return # skip the rest - it's deprecated code
|
||||
|
||||
var impact_vfx
|
||||
|
||||
if ray: # did we hit anything?
|
||||
if ray['collider'].has_method(&'receive_damage') && is_multiplayer_authority():
|
||||
ray['collider'].rpc(&'damage', 20, get_multiplayer_authority(), global_transform.origin) # apply damage
|
||||
|
||||
return
|
||||
|
||||
if ray['collider'].has_method(&'damage'):
|
||||
if is_multiplayer_authority(): #get_tree().multiplayer.get_multiplayer_unique_id() == 1: # make sure this can only run on the server
|
||||
#print("SHOT HIT ", ray['collider'])
|
||||
ray['collider'].damage(20) # apply damage
|
||||
ray['collider'].rpc(&'damage', 20) # apply damage
|
||||
if main.player_list.get(ray['collider'].get_multiplayer_authority()).health <= 0: # if he ded
|
||||
ray['collider'].rpc(&'die', self.get_multiplayer_authority())
|
||||
|
||||
|
@ -106,6 +118,12 @@ var spread = spread_min
|
|||
|
||||
#print(ray)
|
||||
|
||||
func give_damage(target: Node, hit_position: Vector3, hit_normal: Vector3, damage: int, source_position: Vector3, type: Globals.DamageType, push: float):
|
||||
if target.has_method(&'take_damage'): # we've hit a player or something else - the ywill handle everything like effects etc.
|
||||
target.rpc(&'take_damage', player, hit_position, hit_normal, damage, source_position, type, push)
|
||||
else:
|
||||
pass # TODO take data from the material of the target and spawn an appropriate hit effect
|
||||
|
||||
func trigger(index: int, active: bool) -> void:
|
||||
#print("Weapon " + str(name) + ", Trigger " + str(index) + ", active: " + str(active))
|
||||
if index == 0 and active and $Handgun/AnimationPlayer.is_playing() == false:
|
||||
|
|
208
Game/Main.tscn
208
Game/Main.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://o68cawatyat2"]
|
||||
[gd_scene load_steps=23 format=3 uid="uid://o68cawatyat2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1078bn8gy2qf" path="res://Map.tscn" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://b856vwmg8a6o4" path="res://Assets/UI/GUI.tscn" id="2"]
|
||||
|
@ -7,12 +7,212 @@
|
|||
[ext_resource type="AudioStream" uid="uid://j42e203vte7h" path="res://Assets/Announcer/Go.wav" id="5_ilayd"]
|
||||
[ext_resource type="Script" path="res://Assets/Announcer/Announcer.gd" id="6_gcsgr"]
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_6ihsi"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_4sg8c"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_cq3b8"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_ibeng"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 2
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_64m16"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Depth"
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_1syv6"]
|
||||
default_input_values = [0, 0.0, 1, 0.0, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatUniform" id="VisualShaderNodeFloatUniform_gmj03"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
uniform_name = "Damage"
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_g75xc"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeColorConstant" id="VisualShaderNodeColorConstant_awhie"]
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
constant = Color(1, 0.118141, 0, 1)
|
||||
|
||||
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_hcnqy"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = []
|
||||
expanded_output_ports = []
|
||||
input_name = "uv"
|
||||
|
||||
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_c1wnt"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, Vector3(0, 0, 0)]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeSmoothStep" id="VisualShaderNodeSmoothStep_4gtfo"]
|
||||
output_port_for_preview = 0
|
||||
default_input_values = [0, -0.25, 1, 0.25, 2, 0.0]
|
||||
expanded_output_ports = []
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatFunc" id="VisualShaderNodeFloatFunc_bp0gw"]
|
||||
default_input_values = [0, 0.0]
|
||||
expanded_output_ports = []
|
||||
function = 31
|
||||
|
||||
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_wvp6b"]
|
||||
default_input_values = [0, 0.0, 1, 0.0]
|
||||
expanded_output_ports = []
|
||||
operator = 7
|
||||
|
||||
[sub_resource type="VisualShader" id="VisualShader_6cwap"]
|
||||
resource_local_to_scene = true
|
||||
code = "shader_type canvas_item;
|
||||
render_mode skip_vertex_transform, unshaded;
|
||||
|
||||
uniform float Damage;
|
||||
uniform float Depth;
|
||||
|
||||
|
||||
|
||||
void fragment() {
|
||||
// ColorConstant:18
|
||||
vec3 n_out18p0 = vec3(1.000000, 0.118141, 0.000000);
|
||||
float n_out18p1 = 1.000000;
|
||||
|
||||
|
||||
// FloatUniform:16
|
||||
float n_out16p0 = Damage;
|
||||
|
||||
|
||||
// FloatUniform:14
|
||||
float n_out14p0 = Depth;
|
||||
|
||||
|
||||
// Input:2
|
||||
vec3 n_out2p0 = vec3(UV, 0.0);
|
||||
|
||||
|
||||
// VectorDecompose:4
|
||||
float n_out4p0 = n_out2p0.x;
|
||||
float n_out4p1 = n_out2p0.y;
|
||||
float n_out4p2 = n_out2p0.z;
|
||||
|
||||
|
||||
// FloatFunc:10
|
||||
float n_out10p0 = 1.0 - n_out4p0;
|
||||
|
||||
|
||||
// FloatOp:11
|
||||
float n_out11p0 = min(n_out10p0, n_out4p0);
|
||||
|
||||
|
||||
// SmoothStep:12
|
||||
float n_in12p0 = -0.25000;
|
||||
float n_out12p0 = smoothstep(n_in12p0, n_out14p0, n_out11p0);
|
||||
|
||||
|
||||
// FloatFunc:8
|
||||
float n_out8p0 = 1.0 - n_out4p1;
|
||||
|
||||
|
||||
// FloatOp:9
|
||||
float n_out9p0 = min(n_out8p0, n_out4p1);
|
||||
|
||||
|
||||
// SmoothStep:7
|
||||
float n_in7p0 = -0.25000;
|
||||
float n_out7p0 = smoothstep(n_in7p0, n_out14p0, n_out9p0);
|
||||
|
||||
|
||||
// FloatOp:13
|
||||
float n_out13p0 = n_out12p0 * n_out7p0;
|
||||
|
||||
|
||||
// SmoothStep:15
|
||||
float n_in15p0 = 0.00000;
|
||||
float n_out15p0 = smoothstep(n_in15p0, n_out16p0, n_out13p0);
|
||||
|
||||
|
||||
// FloatFunc:17
|
||||
float n_out17p0 = 1.0 - n_out15p0;
|
||||
|
||||
|
||||
// Output:0
|
||||
COLOR.rgb = n_out18p0;
|
||||
COLOR.a = n_out17p0;
|
||||
|
||||
|
||||
}
|
||||
"
|
||||
graph_offset = Vector2(1260.12, -538.301)
|
||||
engine_version = {
|
||||
"major": 4,
|
||||
"minor": 0
|
||||
}
|
||||
mode = 1
|
||||
flags/light_only = false
|
||||
flags/skip_vertex_transform = true
|
||||
flags/unshaded = true
|
||||
nodes/fragment/0/position = Vector2(2200, -240)
|
||||
nodes/fragment/2/node = SubResource( "VisualShaderNodeInput_hcnqy" )
|
||||
nodes/fragment/2/position = Vector2(-800, 20)
|
||||
nodes/fragment/4/node = SubResource( "VisualShaderNodeVectorDecompose_c1wnt" )
|
||||
nodes/fragment/4/position = Vector2(-640, 40)
|
||||
nodes/fragment/7/node = SubResource( "VisualShaderNodeSmoothStep_4gtfo" )
|
||||
nodes/fragment/7/position = Vector2(500, 80)
|
||||
nodes/fragment/8/node = SubResource( "VisualShaderNodeFloatFunc_bp0gw" )
|
||||
nodes/fragment/8/position = Vector2(-340, 40)
|
||||
nodes/fragment/9/node = SubResource( "VisualShaderNodeFloatOp_wvp6b" )
|
||||
nodes/fragment/9/position = Vector2(-120, 120)
|
||||
nodes/fragment/10/node = SubResource( "VisualShaderNodeFloatFunc_6ihsi" )
|
||||
nodes/fragment/10/position = Vector2(-320, -220)
|
||||
nodes/fragment/11/node = SubResource( "VisualShaderNodeFloatOp_4sg8c" )
|
||||
nodes/fragment/11/position = Vector2(-80, -180)
|
||||
nodes/fragment/12/node = SubResource( "VisualShaderNodeSmoothStep_cq3b8" )
|
||||
nodes/fragment/12/position = Vector2(420, -240)
|
||||
nodes/fragment/13/node = SubResource( "VisualShaderNodeFloatOp_ibeng" )
|
||||
nodes/fragment/13/position = Vector2(920, -120)
|
||||
nodes/fragment/14/node = SubResource( "VisualShaderNodeFloatUniform_64m16" )
|
||||
nodes/fragment/14/position = Vector2(-200, -440)
|
||||
nodes/fragment/15/node = SubResource( "VisualShaderNodeSmoothStep_1syv6" )
|
||||
nodes/fragment/15/position = Vector2(1320, -240)
|
||||
nodes/fragment/16/node = SubResource( "VisualShaderNodeFloatUniform_gmj03" )
|
||||
nodes/fragment/16/position = Vector2(720, -540)
|
||||
nodes/fragment/17/node = SubResource( "VisualShaderNodeFloatFunc_g75xc" )
|
||||
nodes/fragment/17/position = Vector2(1592.12, -100.301)
|
||||
nodes/fragment/18/node = SubResource( "VisualShaderNodeColorConstant_awhie" )
|
||||
nodes/fragment/18/position = Vector2(1600, -400)
|
||||
nodes/fragment/connections = PackedInt32Array(2, 0, 4, 0, 8, 0, 9, 0, 9, 0, 7, 2, 10, 0, 11, 0, 4, 1, 8, 0, 4, 1, 9, 1, 4, 0, 10, 0, 4, 0, 11, 1, 11, 0, 12, 2, 12, 0, 13, 0, 7, 0, 13, 1, 14, 0, 12, 1, 14, 0, 7, 1, 13, 0, 15, 2, 16, 0, 15, 1, 15, 0, 17, 0, 17, 0, 0, 1, 18, 0, 0, 0)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q54x5"]
|
||||
resource_local_to_scene = true
|
||||
shader = SubResource( "VisualShader_6cwap" )
|
||||
shader_param/Damage = 0.0
|
||||
shader_param/Depth = 0.33
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( "3" )
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( "4" )]
|
||||
|
||||
[node name="AnimationPlayer" parent="HUD/Crosshair" index="1"]
|
||||
[node name="EyeBleed" parent="HUD/Damage" index="0"]
|
||||
material = SubResource( "ShaderMaterial_q54x5" )
|
||||
|
||||
[node name="AnimationPlayer" parent="HUD/Crosshair" index="3"]
|
||||
blend_times = []
|
||||
|
||||
[node name="ChatHistory" parent="HUD/Chat/VBoxContainer" index="0"]
|
||||
|
@ -25,10 +225,10 @@ structured_text_bidi_override_options = []
|
|||
[node name="Editor" parent="HUD/Chat/VBoxContainer/Typing" index="1"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="RespawnCountdown" parent="HUD" index="3"]
|
||||
[node name="RespawnCountdown" parent="HUD" index="4"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="ScoreRank" parent="HUD" index="4"]
|
||||
[node name="ScoreRank" parent="HUD" index="5"]
|
||||
structured_text_bidi_override_options = []
|
||||
|
||||
[node name="Header" parent="HUD/ScoreTable/VBoxContainer" index="0"]
|
||||
|
|
|
@ -8,6 +8,28 @@
|
|||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[{
|
||||
"base": "StandardMaterial3D",
|
||||
"class": &"ExtendedMaterial",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterial.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": &"ExtendedMaterialDamageEffect",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterialDamageEffect.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": &"ExtendedMaterialType",
|
||||
"language": &"GDScript",
|
||||
"path": "res://Assets/Materials/ExtendedMaterials/ExtendedMaterialType.gd"
|
||||
}]
|
||||
_global_script_class_icons={
|
||||
"ExtendedMaterial": "",
|
||||
"ExtendedMaterialDamageEffect": "",
|
||||
"ExtendedMaterialType": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Liblast"
|
||||
|
@ -18,6 +40,14 @@ boot_splash/use_filter=false
|
|||
boot_splash/bg_color=Color(0, 0, 0, 1)
|
||||
config/icon="res://Assets/Effects/Logo.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
Globals="*res://Assets/Globals.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/vsync/vsync_mode=2
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/fbx/use_fbx=false
|
||||
|
@ -147,6 +177,8 @@ show_scoretab={
|
|||
|
||||
[rendering]
|
||||
|
||||
shadows/directional_shadow/soft_shadow_quality=4
|
||||
shadows/shadows/soft_shadow_quality=4
|
||||
reflections/sky_reflections/fast_filter_high_quality=true
|
||||
environment/ssao/quality=0
|
||||
environment/screen_space_reflection/roughness_quality=3
|
||||
|
|
Reference in New Issue