Add a spotlight for Tim
This commit is contained in:
parent
afc81354df
commit
d44ac6ee02
|
@ -3,16 +3,20 @@ extends Node2D
|
||||||
|
|
||||||
@export var width = 200.
|
@export var width = 200.
|
||||||
|
|
||||||
|
|
||||||
# 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):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func get_most_left_position():
|
func get_most_left_position():
|
||||||
return global_position.x - width / 2
|
return global_position.x - width / 2
|
||||||
|
|
||||||
|
|
||||||
func get_most_right_position():
|
func get_most_right_position():
|
||||||
return global_position.x + width / 2
|
return global_position.x + width / 2
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
class_name BootsplashScene
|
class_name BootsplashScene
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
@export var fade_duration:float = 1.0
|
@export var fade_duration: float = 1.0
|
||||||
@export var stay_duration:float = 1.5
|
@export var stay_duration: float = 1.5
|
||||||
@export var node:PackedScene
|
@export var node: PackedScene
|
||||||
@export var next_scene:PackedScene
|
@export var next_scene: PackedScene
|
||||||
@export var interuptable:bool = true
|
@export var interuptable: bool = true
|
||||||
|
|
||||||
@onready var control = %NodeContainer
|
@onready var control = %NodeContainer
|
||||||
@onready var instance:Node2D = node.instantiate()
|
@onready var instance: Node2D = node.instantiate()
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
instance.modulate.a = 0.0
|
instance.modulate.a = 0.0
|
||||||
|
@ -16,21 +17,28 @@ func _ready():
|
||||||
var tween = create_tween()
|
var tween = create_tween()
|
||||||
tween.set_trans(Tween.TRANS_CUBIC)
|
tween.set_trans(Tween.TRANS_CUBIC)
|
||||||
tween.set_ease(Tween.EASE_IN)
|
tween.set_ease(Tween.EASE_IN)
|
||||||
tween.tween_property(instance, "modulate:a", 1.0, fade_duration)\
|
tween.tween_property(instance, "modulate:a", 1.0, fade_duration).from(0.0).finished.connect(
|
||||||
.from(0.0)\
|
_fade_out
|
||||||
.finished.connect(_fade_out)
|
)
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
if interuptable and Input.is_action_just_pressed("exit"):
|
if interuptable and Input.is_action_just_pressed("exit"):
|
||||||
_change_scene()
|
_change_scene()
|
||||||
|
|
||||||
|
|
||||||
func _fade_out():
|
func _fade_out():
|
||||||
var tween = create_tween()
|
var tween = create_tween()
|
||||||
tween.set_trans(Tween.TRANS_CUBIC)
|
tween.set_trans(Tween.TRANS_CUBIC)
|
||||||
tween.set_ease(Tween.EASE_IN)
|
tween.set_ease(Tween.EASE_IN)
|
||||||
tween.tween_property(instance, "modulate:a", 0.0, fade_duration)\
|
(
|
||||||
.set_delay(stay_duration)\
|
tween
|
||||||
.finished.connect(_change_scene)
|
. tween_property(instance, "modulate:a", 0.0, fade_duration)
|
||||||
|
. set_delay(stay_duration)
|
||||||
|
. finished
|
||||||
|
. connect(_change_scene)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _change_scene():
|
func _change_scene():
|
||||||
get_tree().change_scene_to_packed(next_scene)
|
get_tree().change_scene_to_packed(next_scene)
|
||||||
|
|
|
@ -3,9 +3,9 @@ extends Node2D
|
||||||
|
|
||||||
@export_range(1, 16, 1) var max_persons = 16
|
@export_range(1, 16, 1) var max_persons = 16
|
||||||
|
|
||||||
|
var audience: Array[AudienceMember] = []
|
||||||
|
var overall_mood: float = 0
|
||||||
|
|
||||||
var audience : Array[AudienceMember] = []
|
|
||||||
var overall_mood : float = 0
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var counter = 0
|
var counter = 0
|
||||||
|
@ -20,6 +20,7 @@ func _ready():
|
||||||
if counter == max_persons:
|
if counter == max_persons:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
# 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):
|
||||||
overall_mood = 0
|
overall_mood = 0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scenes/crowd/crowd.gd" id="1_y7wyj"]
|
[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="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"]
|
[node name="Crowd" type="Node2D"]
|
||||||
position = Vector2(240, 232)
|
position = Vector2(240, 232)
|
||||||
|
@ -131,3 +131,7 @@ z_index = 46
|
||||||
position = Vector2(237, 15)
|
position = Vector2(237, 15)
|
||||||
|
|
||||||
[node name="Chair" parent="Seats/Seat_16" instance=ExtResource("3_y4hpm")]
|
[node name="Chair" parent="Seats/Seat_16" instance=ExtResource("3_y4hpm")]
|
||||||
|
|
||||||
|
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||||
|
show_behind_parent = true
|
||||||
|
color = Color(0.494118, 0.494118, 0.494118, 1)
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
[gd_scene load_steps=18 format=3 uid="uid://cicyfp5xjvvu4"]
|
[gd_scene load_steps=19 format=3 uid="uid://cicyfp5xjvvu4"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bg85if5rrrdmm" path="res://sprites/room/buehne.svg" id="1_32lst"]
|
[ext_resource type="Texture2D" uid="uid://bg85if5rrrdmm" path="res://sprites/room/buehne.svg" id="1_32lst"]
|
||||||
[ext_resource type="Script" path="res://scenes/Tim.gd" id="1_g3k2b"]
|
[ext_resource type="Script" path="res://scenes/Tim.gd" id="1_g3k2b"]
|
||||||
[ext_resource type="Texture2D" uid="uid://kq63ictuirhc" path="res://sprites/tim_side.png" id="1_saxit"]
|
[ext_resource type="Texture2D" uid="uid://kq63ictuirhc" path="res://sprites/tim_side.png" id="1_saxit"]
|
||||||
[ext_resource type="Script" path="res://scenes/Boundary.gd" id="2_8p6ir"]
|
[ext_resource type="Script" path="res://scenes/Boundary.gd" id="2_8p6ir"]
|
||||||
[ext_resource type="PackedScene" uid="uid://r1i7ln2hpwq5" path="res://scenes/joke_button.tscn" id="3_0t41i"]
|
[ext_resource type="PackedScene" uid="uid://r1i7ln2hpwq5" path="res://scenes/joke_button.tscn" id="3_0t41i"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bmx2q0w1s046n" path="res://sprites/ui/spotlight.svg" id="3_8lu50"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b8tb4o75kjffn" path="res://sprites/tim_talk.svg" id="3_e1fvx"]
|
[ext_resource type="Texture2D" uid="uid://b8tb4o75kjffn" path="res://sprites/tim_talk.svg" id="3_e1fvx"]
|
||||||
[ext_resource type="Script" path="res://scenes/DisplayStamina.gd" id="6_88orn"]
|
[ext_resource type="Script" path="res://scenes/DisplayStamina.gd" id="6_88orn"]
|
||||||
[ext_resource type="FontFile" uid="uid://le2vdo2626vw" path="res://fonts/Montserrat-Medium.ttf" id="6_pb3a7"]
|
[ext_resource type="FontFile" uid="uid://le2vdo2626vw" path="res://fonts/Montserrat-Medium.ttf" id="6_pb3a7"]
|
||||||
|
@ -121,9 +122,18 @@ action = "joke_button_3"
|
||||||
|
|
||||||
[node name="Joke Transmitter" type="Node2D" parent="Tim"]
|
[node name="Joke Transmitter" type="Node2D" parent="Tim"]
|
||||||
|
|
||||||
|
[node name="Spotlight" type="PointLight2D" parent="Tim/Joke Transmitter"]
|
||||||
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
|
show_behind_parent = true
|
||||||
|
z_index = -20
|
||||||
|
position = Vector2(2.08165e-12, -500)
|
||||||
|
energy = 0.4
|
||||||
|
texture = ExtResource("3_8lu50")
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="Tim/Joke Transmitter"]
|
[node name="Area2D" type="Area2D" parent="Tim/Joke Transmitter"]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tim/Joke Transmitter/Area2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tim/Joke Transmitter/Area2D"]
|
||||||
|
position = Vector2(0, -176)
|
||||||
shape = SubResource("RectangleShape2D_wmfel")
|
shape = SubResource("RectangleShape2D_wmfel")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Tim"]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="Tim"]
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="250.00002"
|
||||||
|
height="1000.0001"
|
||||||
|
viewBox="0 0 66.145836 264.58335"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient1">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0.10467289"
|
||||||
|
id="stop1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0.9372549;"
|
||||||
|
offset="0.90093458"
|
||||||
|
id="stop4" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop2" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
xlink:href="#linearGradient1"
|
||||||
|
id="linearGradient2"
|
||||||
|
x1="-0.56500155"
|
||||||
|
y1="132.57417"
|
||||||
|
x2="66.145836"
|
||||||
|
y2="132.57417"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(0.28250201,-0.28251351)" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
id="layer1">
|
||||||
|
<rect
|
||||||
|
style="fill:url(#linearGradient2);fill-opacity:1;stroke:none;stroke-width:0.565"
|
||||||
|
id="rect1"
|
||||||
|
width="66.145836"
|
||||||
|
height="264.58334"
|
||||||
|
x="0"
|
||||||
|
y="0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bmx2q0w1s046n"
|
||||||
|
path="res://.godot/imported/spotlight.svg-f6d684577e7bd3fc0fb3e8fdd58e1327.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://sprites/ui/spotlight.svg"
|
||||||
|
dest_files=["res://.godot/imported/spotlight.svg-f6d684577e7bd3fc0fb3e8fdd58e1327.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
Loading…
Reference in New Issue