-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGlobal.gd
36 lines (28 loc) · 880 Bytes
/
Global.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
extends Node
# Used for miscellaneous variables/functions that need to be accessible from everywhere.
var weapon1
var weapon2
var weapon3
var weapon4
var map
var username
var kick_reason = ""
var paused = false
var just_launched = true
var wants_splashscreens
func pause_game():
var player = get_node("/root/GameController/" + str(get_tree().get_network_unique_id()))
Global.paused = true
player.can_grapple = false
player.can_move = false
player.can_jump = false
player.get_node("Weapon/GunStats").can_fire = false
player.get_node("Camera2D").clear_current()
func resume_game():
var player = get_node("/root/GameController/" + str(get_tree().get_network_unique_id()))
Global.paused = false
player.can_grapple = true
player.can_move = true
player.can_jump = true
player.get_node("Weapon/GunStats").can_fire = true
player.get_node("Camera2D").make_current()