init
This commit is contained in:
commit
18efc36800
161 changed files with 5008 additions and 0 deletions
34
scripts/crt_controller.gd
Normal file
34
scripts/crt_controller.gd
Normal file
|
@ -0,0 +1,34 @@
|
|||
extends Node
|
||||
class_name CRT
|
||||
|
||||
@export var normal_filter: Control
|
||||
@export var distortion_filter: Control
|
||||
|
||||
var clicksNeeded: int
|
||||
var distortionEnabled: bool
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
normal_filter.visible = true
|
||||
distortion_filter.visible = false
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
if distortionEnabled and Input.is_action_just_pressed("BTN_6"):
|
||||
clicksNeeded -= 1
|
||||
if clicksNeeded <= 0:
|
||||
disable_distortion()
|
||||
|
||||
|
||||
func enable_distortion(clicks: int):
|
||||
normal_filter.visible = false
|
||||
distortion_filter.visible = true
|
||||
clicksNeeded = clicks
|
||||
distortionEnabled = true
|
||||
|
||||
|
||||
func disable_distortion():
|
||||
normal_filter.visible = true
|
||||
distortion_filter.visible = false
|
||||
distortionEnabled = false
|
Loading…
Add table
Add a link
Reference in a new issue