Cultist Killability

This commit is contained in:
ncusimano 2023-08-20 16:58:05 -06:00
parent 70309d0949
commit c1693ff787
3 changed files with 7 additions and 6 deletions

View File

@ -22,13 +22,13 @@
[ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="24_ddfvk"] [ext_resource type="PackedScene" uid="uid://c4s6y758n77lw" path="res://villager_shared.tscn" id="24_ddfvk"]
[ext_resource type="PackedScene" uid="uid://b3aus2kigf8xt" path="res://Models/beach_decor/cooler.tscn" id="24_sl7ne"] [ext_resource type="PackedScene" uid="uid://b3aus2kigf8xt" path="res://Models/beach_decor/cooler.tscn" id="24_sl7ne"]
[ext_resource type="PackedScene" uid="uid://cft26nug7kyqb" path="res://ambient_light_1.tscn" id="25_novxt"] [ext_resource type="PackedScene" uid="uid://cft26nug7kyqb" path="res://ambient_light_1.tscn" id="25_novxt"]
[ext_resource type="PackedScene" uid="uid://ukful430mmkn" path="res://color_cube.tscn" id="25_rm0cr"] [ext_resource type="PackedScene" path="res://color_cube.tscn" id="25_rm0cr"]
[ext_resource type="PackedScene" uid="uid://d2pvg0f5jtpve" path="res://slime_kill_box.tscn" id="27_cjxk6"] [ext_resource type="PackedScene" path="res://slime_kill_box.tscn" id="27_cjxk6"]
[ext_resource type="PackedScene" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"] [ext_resource type="PackedScene" uid="uid://bw3k2c75qavce" path="res://Models/beach_decor/bucket.tscn" id="27_f3p1i"]
[ext_resource type="PackedScene" uid="uid://6ycop5t3nra5" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"] [ext_resource type="PackedScene" path="res://Level/World/DayNightEnvironment.tscn" id="27_jutn4"]
[ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"] [ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"]
[ext_resource type="PackedScene" uid="uid://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"] [ext_resource type="PackedScene" path="res://crate.tscn" id="28_x0lrj"]
[ext_resource type="PackedScene" path="res://spawner.tscn" id="29_etvc6"] [ext_resource type="PackedScene" uid="uid://d0uw7ykhb1cx8" path="res://spawner.tscn" id="29_etvc6"]
[sub_resource type="Animation" id="Animation_jpnyu"] [sub_resource type="Animation" id="Animation_jpnyu"]
resource_name = "waves" resource_name = "waves"

View File

@ -2,6 +2,6 @@ extends Area3D
func _on_body_entered(body): func _on_body_entered(body):
if "color_changes" in body: if "is_killable" in body:
body.queue_free() body.queue_free()
$AudioStreamPlayer.play() $AudioStreamPlayer.play()

View File

@ -2,6 +2,7 @@ extends CharacterBody3D
class_name SharedSlime class_name SharedSlime
var is_holdable: bool = true var is_holdable: bool = true
var is_killable: bool = true
var rng = RandomNumberGenerator.new() var rng = RandomNumberGenerator.new()
@onready var target_location_xz = transform.origin * Vector3(1, 0, 1) @onready var target_location_xz = transform.origin * Vector3(1, 0, 1)