sync indents
This commit is contained in:
parent
7021cf6634
commit
8ade594449
|
@ -7,7 +7,7 @@ extends Node2D
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
|
|
@ -4,11 +4,11 @@ extends Node2D
|
||||||
var max_persons = 16
|
var max_persons = 16
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var counter = 0
|
var counter = 0
|
||||||
var person = preload("res://scenes/crowd/person.tscn")
|
var person = preload("res://scenes/crowd/person.tscn")
|
||||||
for seat in $Seats.get_children():
|
for seat in $Seats.get_children():
|
||||||
seat.add_child(person.instantiate())
|
seat.add_child(person.instantiate())
|
||||||
|
|
||||||
counter += 1
|
counter += 1
|
||||||
if counter == max_persons:
|
if counter == max_persons:
|
||||||
break
|
break
|
||||||
|
|
|
@ -125,9 +125,9 @@ func on_joke(joke: Joke):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func throw_bottle():
|
func throw_bottle():
|
||||||
mood += 2.0
|
mood += 2.0
|
||||||
|
|
||||||
var bottle_scene = preload("res://scenes/objects/bottle.tscn")
|
var bottle_scene = preload("res://scenes/objects/bottle.tscn")
|
||||||
var bottle = bottle_scene.instantiate()
|
var bottle = bottle_scene.instantiate()
|
||||||
|
|
||||||
add_child(bottle);
|
add_child(bottle);
|
||||||
|
|
|
@ -7,25 +7,25 @@ var is_hidding: bool
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
tim_global_position = get_node("/root/IngameScene/Stage/Tim/ThrowPoint").global_position
|
tim_global_position = get_node("/root/IngameScene/Stage/Tim/ThrowPoint").global_position
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
var t = create_tween()
|
var t = create_tween()
|
||||||
t.tween_property(self, "global_position", tim_global_position, 3.0)
|
t.tween_property(self, "global_position", tim_global_position, 3.0)
|
||||||
t.tween_callback(remove_bottle)
|
t.tween_callback(remove_bottle)
|
||||||
|
|
||||||
func _on_bottle_area_entered(area):
|
func _on_bottle_area_entered(area):
|
||||||
is_hidding = true
|
is_hidding = true
|
||||||
|
|
||||||
func _on_bottle_area_exited(area):
|
func _on_bottle_area_exited(area):
|
||||||
is_hidding = false
|
is_hidding = false
|
||||||
|
|
||||||
func _on_growth_timer_timeout():
|
func _on_growth_timer_timeout():
|
||||||
var t = create_tween()
|
var t = create_tween()
|
||||||
t.tween_property(self, "scale", self.scale + Vector2(0.01, 0.01), 0.02)
|
t.tween_property(self, "scale", self.scale + Vector2(0.01, 0.01), 0.02)
|
||||||
|
|
||||||
func remove_bottle():
|
func remove_bottle():
|
||||||
if is_hidding:
|
if is_hidding:
|
||||||
print("Ouch")
|
print("Ouch")
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://c5f5v1wtottyp"]
|
[gd_scene load_steps=4 format=3 uid="uid://c5f5v1wtottyp"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scenes/objects/bottle.gd" id="1_87ktq"]
|
[ext_resource type="Script" path="res://scenes/objects/bottle.gd" id="1_87ktq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cow4dd0hlxrgr" path="res://sprites/room/bottle.svg" id="1_uea7l"]
|
[ext_resource type="Texture2D" uid="uid://bavsg3hu7pccy" path="res://sprites/room/bottle.svg" id="1_uea7l"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_p8qcj"]
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_p8qcj"]
|
||||||
radius = 22.4893
|
radius = 22.4893
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue