generated from krampus/template-godot4
TransientFloorSpawner removal is persistent
This commit is contained in:
parent
5440366f52
commit
ddf0e2cccc
@ -0,0 +1,13 @@
|
||||
extends FloorSpawner
|
||||
## Floor spawner that gets removed when the player degrunks it
|
||||
## We can use this to ensure the beast only gets spawned on heavily-grunked parts of the floor.
|
||||
|
||||
|
||||
func serialize() -> Dictionary:
|
||||
# Nothing to serialize, but we need a placeholder value to show we haven't been destroyed.
|
||||
return {}
|
||||
|
||||
|
||||
func deserialize(_state: Dictionary) -> void:
|
||||
# Nothing to deserialize, but we won't be freed!
|
||||
pass
|
@ -0,0 +1 @@
|
||||
uid://b7wejb2uwu43a
|
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://5vh7mnjavlle"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cqildi0gndwp2" path="res://src/world/grunk_beast/beast_spawner/floor_spawner.gd" id="1_42oks"]
|
||||
[ext_resource type="Script" uid="uid://b7wejb2uwu43a" path="res://src/world/grunk_beast/beast_spawner/transient_floor_spawner.gd" id="1_42oks"]
|
||||
[ext_resource type="PackedScene" uid="uid://ehf5sg3ahvbf" path="res://src/world/grunk_beast/grunk_beast.tscn" id="2_e5rh0"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_42oks"]
|
||||
@ -16,10 +16,9 @@ height = 0.02
|
||||
height = 0.1
|
||||
radius = 1.2
|
||||
|
||||
[node name="TransientFloorSpawner" type="Node3D" node_paths=PackedStringArray("spawn_exclusion_area") groups=["BeastSpawnPoint"]]
|
||||
[node name="TransientFloorSpawner" type="Node3D" groups=["BeastSpawnPoint", "Persistent"]]
|
||||
script = ExtResource("1_42oks")
|
||||
beast_scene = ExtResource("2_e5rh0")
|
||||
spawn_exclusion_area = NodePath("SpawnExclusionArea")
|
||||
spawn_priority = 10
|
||||
metadata/_custom_type_script = "uid://cqildi0gndwp2"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user