Add hook stub for empty stamina
This commit is contained in:
parent
177e59243b
commit
677a7c518a
|
@ -27,10 +27,19 @@ func _process(delta):
|
|||
global_position = Vector2(boundary.get_most_left_position(), global_position.y)
|
||||
|
||||
|
||||
func _on_joke_button_button_pressed(joke):
|
||||
func _on_joke_button_button_pressed(joke: Joke):
|
||||
stamina -= joke.required_stamina
|
||||
|
||||
for body in transmitter_area.get_overlapping_bodies():
|
||||
var person = body.find_parent("Person")
|
||||
if not (person is AudienceMember):
|
||||
continue
|
||||
|
||||
person.on_joke(joke)
|
||||
|
||||
|
||||
if stamina <= 0:
|
||||
_on_stamina_empty()
|
||||
|
||||
func _on_stamina_empty():
|
||||
pass
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource type="Script" path="res://scenes/crowd/crowd.gd" id="1_y7wyj"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6p145ne8x013" path="res://sprites/room/table.svg" id="2_bax5s"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbehbuw5lvfkr" path="res://sprites/room/chair.tscn" id="3_y4hpm"]
|
||||
[ext_resource type="PackedScene" path="res://sprites/room/chair.tscn" id="3_y4hpm"]
|
||||
|
||||
[node name="Crowd" type="Node2D"]
|
||||
position = Vector2(240, 232)
|
||||
|
|
Loading…
Reference in New Issue