generated from MechanicalFlower/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14a29e7
commit c2a1a52
Showing
9 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
Binary file modified
BIN
-43 Bytes
(100%)
assets/models/lamp_post_bench_trashcan/street_lamp.material
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extends Area3D | ||
|
||
|
||
func _on_body_entered(body): | ||
if body is MovementController: | ||
GlobalSignal.trigger_signal(&"light_up", [true]) | ||
|
||
|
||
func _on_body_exited(body): | ||
if body is MovementController: | ||
GlobalSignal.trigger_signal(&"light_up", [false]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
extends Node | ||
|
||
@onready var player = get_parent() | ||
@onready var tween = create_tween() | ||
|
||
|
||
func _ready(): | ||
GlobalSignal.add_listener(&"light_up", self._on_Player_light_up) | ||
|
||
func _on_Player_light_up(in_light: bool): | ||
if tween: | ||
tween.stop() | ||
tween = create_tween() | ||
if in_light: | ||
if tween: | ||
tween.tween_property($"../../Lighting/PostProcess", "configuration:VignetteIntensity", 0.0, 0.1) | ||
tween.set_trans(Tween.TRANS_SINE) | ||
else: | ||
if tween: | ||
tween.tween_property($"../../Lighting/PostProcess", "configuration:VignetteIntensity", 0.4, 0.1) | ||
tween.set_trans(Tween.TRANS_SINE) |