init
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
extends Area3D
|
||||
class_name DynRoom
|
||||
|
||||
@export var processWhileUnloaded = false
|
||||
@export var loadedOnReady = false
|
||||
|
||||
func _ready() -> void:
|
||||
connect("body_entered", entered)
|
||||
connect("body_exited", exited)
|
||||
self.disable_mode=CollisionObject3D.DISABLE_MODE_KEEP_ACTIVE
|
||||
self.collision_layer=0
|
||||
self.collision_mask=2
|
||||
if not loadedOnReady:
|
||||
exited(self)
|
||||
|
||||
func entered(body: Node3D) -> void:
|
||||
visible=true
|
||||
if not processWhileUnloaded:
|
||||
process_mode=Node.PROCESS_MODE_INHERIT
|
||||
|
||||
func exited(body: Node3D) -> void:
|
||||
visible=false
|
||||
if not processWhileUnloaded:
|
||||
process_mode=Node.PROCESS_MODE_DISABLED
|
||||
@@ -0,0 +1 @@
|
||||
uid://bllooqekhtqdd
|
||||
@@ -0,0 +1 @@
|
||||
class_name Menu
|
||||
@@ -0,0 +1 @@
|
||||
uid://ks1q5xbtjx2w
|
||||
@@ -0,0 +1,11 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
@@ -0,0 +1 @@
|
||||
uid://dmtakahgdc3k4
|
||||
@@ -0,0 +1,26 @@
|
||||
@tool
|
||||
extends SpotLight3D
|
||||
class_name VolumetricLight3D
|
||||
var node:MeshInstance3D=MeshInstance3D.new()
|
||||
var mesh:CylinderMesh=CylinderMesh.new()
|
||||
@export var material:Material=Material.new()
|
||||
|
||||
func _ready() -> void:
|
||||
mesh.top_radius=0
|
||||
mesh.material=material
|
||||
node.mesh=mesh
|
||||
node.rotation_degrees.x=90
|
||||
self.add_child(node)
|
||||
mesh.height=self.spot_range
|
||||
node.position.z=-(self.spot_range/2)
|
||||
var angle_rad=deg_to_rad(self.spot_angle)
|
||||
mesh.bottom_radius=self.spot_range * tan(angle_rad)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Engine.is_editor_hint():
|
||||
mesh.height=self.spot_range
|
||||
node.position.z=-(self.spot_range/2)
|
||||
var angle_rad=deg_to_rad(self.spot_angle)
|
||||
mesh.bottom_radius=self.spot_range * tan(angle_rad)
|
||||
else:
|
||||
self.process_mode=Node.PROCESS_MODE_DISABLED
|
||||
@@ -0,0 +1 @@
|
||||
uid://c82vy0xj7s130
|
||||
Reference in New Issue
Block a user