generated from krampus/template-godot4
Expose dust emitter scale through LaserCast
This commit is contained in:
parent
20a7fd7551
commit
491b5d8b8d
@ -4,6 +4,7 @@ class_name LaserCast extends RayCast3D
|
|||||||
const NORMAL_OFFSET = 0.05
|
const NORMAL_OFFSET = 0.05
|
||||||
|
|
||||||
@export var parent_tool: Spray
|
@export var parent_tool: Spray
|
||||||
|
@export var dust_emission_scale: float
|
||||||
|
|
||||||
# Currently gunking
|
# Currently gunking
|
||||||
var gunk_id: int
|
var gunk_id: int
|
||||||
@ -14,6 +15,10 @@ var gunkable: Gunkable
|
|||||||
@onready var gunk_dust: GunkDust = %GunkDust
|
@onready var gunk_dust: GunkDust = %GunkDust
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
gunk_dust.emit_scale = dust_emission_scale
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if is_colliding() and parent_tool.firing:
|
if is_colliding() and parent_tool.firing:
|
||||||
var child_pos := get_collision_point() + get_collision_normal() * NORMAL_OFFSET
|
var child_pos := get_collision_point() + get_collision_normal() * NORMAL_OFFSET
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
[ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/laser_cast/laser_cast.gd" id="1_xntcr"]
|
[ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/laser_cast/laser_cast.gd" id="1_xntcr"]
|
||||||
[ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"]
|
[ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"]
|
||||||
[ext_resource type="Script" uid="uid://br7war1wh7wfd" path="res://src/equipment/laser_cast/flicker_light.gd" id="3_bkg64"]
|
[ext_resource type="Script" uid="uid://br7war1wh7wfd" path="res://src/equipment/laser_cast/flicker_light.gd" id="3_bkg64"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c3iv00vmdqxp0" path="res://src/effects/gunk_dust.tscn" id="4_ekmqg"]
|
[ext_resource type="PackedScene" uid="uid://c3iv00vmdqxp0" path="res://src/effects/gunk_dust/gunk_dust.tscn" id="4_ekmqg"]
|
||||||
[ext_resource type="Script" uid="uid://b88k7m1mwrd0v" path="res://src/world/gunkable/gunk_dust.gd" id="5_r1geq"]
|
[ext_resource type="Script" uid="uid://b88k7m1mwrd0v" path="res://src/effects/gunk_dust/gunk_dust.gd" id="5_r1geq"]
|
||||||
|
|
||||||
[node name="LaserCast" type="RayCast3D"]
|
[node name="LaserCast" type="RayCast3D"]
|
||||||
target_position = Vector3(0, 0, -2)
|
target_position = Vector3(0, 0, -2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user