From d6e23504d7dda9b5e1409d918945fb01796db5a6 Mon Sep 17 00:00:00 2001 From: nokoe Date: Sun, 14 Jul 2024 16:01:14 +0200 Subject: bread steam --- client/map/items/bread.gd | 13 +++++++++++++ client/map/items/steam.tscn | 1 + 2 files changed, 14 insertions(+) diff --git a/client/map/items/bread.gd b/client/map/items/bread.gd index b049b450..b5143c53 100644 --- a/client/map/items/bread.gd +++ b/client/map/items/bread.gd @@ -16,6 +16,19 @@ class_name Bread extends Item +var steam: CPUParticles3D = preload("res://map/items/steam.tscn").instantiate() + func _init(owned_by_: Node3D): super(owned_by_) base.add_child(load("res://map/items/bread.tscn").instantiate()) + steam.position.y += .1 + steam.color = Color(.6, .6, .6, .4) + base.add_child(steam) + +func progress(p: float, warn: bool): + super(p, warn) + steam.emitting = warn + +func finish(warn: bool): + super(warn) + steam.emitting = false diff --git a/client/map/items/steam.tscn b/client/map/items/steam.tscn index 4a112278..a6114124 100644 --- a/client/map/items/steam.tscn +++ b/client/map/items/steam.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://g1wsqgb56o1o"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_e1q7j"] +transparency = 1 vertex_color_use_as_albedo = true [sub_resource type="SphereMesh" id="SphereMesh_mk24m"] -- cgit v1.2.3-70-g09d2