Moved Scripts to proper place
This commit is contained in:
@ -1,39 +0,0 @@
|
||||
extends Control
|
||||
|
||||
signal paused
|
||||
signal unpaused
|
||||
|
||||
func _ready():
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("quit"):
|
||||
pause_game_button()
|
||||
|
||||
|
||||
func pause_game_button():
|
||||
if $Settings.visible:
|
||||
$Settings.hide()
|
||||
$"Pause Menu".show()
|
||||
elif $"Pause Menu".visible:
|
||||
$"Pause Menu".hide()
|
||||
hide()
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
emit_signal("unpaused")
|
||||
else:
|
||||
show()
|
||||
$"Pause Menu".show()
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
emit_signal("paused")
|
||||
|
||||
func _on_quit_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _on_resume_pressed():
|
||||
pause_game_button()
|
||||
|
||||
|
||||
func _on_settings_pressed():
|
||||
$"Pause Menu".hide()
|
||||
$"Settings".show()
|
||||
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bwo6gvmi3jcqt"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/components/Pause Screen.gd" id="1_tqif2"]
|
||||
[ext_resource type="Script" path="res://Assets/scripts/Pause Screen.gd" id="1_tqif2"]
|
||||
|
||||
[node name="Menus" type="Control"]
|
||||
layout_mode = 3
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/scripts/player.gd" id="1_b2ij4"]
|
||||
[ext_resource type="Script" path="res://Assets/scripts/Head.gd" id="2_is0vo"]
|
||||
[ext_resource type="Script" path="res://Assets/components/vapelight.gd" id="2_ndvgb"]
|
||||
[ext_resource type="Script" path="res://Assets/scripts/vapelight.gd" id="2_ndvgb"]
|
||||
[ext_resource type="Script" path="res://Assets/scripts/LoadingScreen.gd" id="4_1bb8i"]
|
||||
[ext_resource type="Theme" uid="uid://dnoxpn5kedvxh" path="res://Assets/Resources/VCRFont.tres" id="4_7cvtk"]
|
||||
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
extends SpotLight3D
|
||||
|
||||
var Power = 0.0
|
||||
var MaxPow = 10
|
||||
var is_vaping = false
|
||||
|
||||
func _ready():
|
||||
light_energy = 0
|
||||
|
||||
func _process(delta):
|
||||
if is_vaping:
|
||||
if light_energy < MaxPow:
|
||||
light_energy += 1 * delta
|
||||
else:
|
||||
if light_energy > 0:
|
||||
light_energy -= .1
|
||||
if light_energy <= 0:
|
||||
hide()
|
||||
if light_energy > 0:
|
||||
show()
|
||||
|
||||
func on():
|
||||
is_vaping = true
|
||||
|
||||
func off():
|
||||
is_vaping = false
|
||||
|
||||
Reference in New Issue
Block a user