File tree 7 files changed +10
-12
lines changed
7 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
1
[gd_scene load_steps =42 format =3 uid ="uid://cjm5lrxicdgsf" ]
2
- # sebashtioon was here
2
+
3
3
[ext_resource type ="Script" path ="res://Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd" id ="1_5mhs1" ]
4
4
[ext_resource type ="Script" path ="res://Textures/Icons/Script Icons/Scripts/CameraIcon_SCRIPT.gd" id ="2_37tst" ]
5
5
[ext_resource type ="Texture2D" uid ="uid://tmqrfb1atg1j" path ="res://Textures/Crosshairs/Expland_Crosshair.png" id ="2_606ex" ]
Original file line number Diff line number Diff line change @@ -578,4 +578,4 @@ func _on_start_debugging_btn_pressed() -> void:
578
578
579
579
## ####################################
580
580
# Playground
581
- ## ####################################
581
+ ## ####################################
Original file line number Diff line number Diff line change 1
- saveData ( # ============================================================= #
1
+ # ============================================================= #
2
2
# world_SCRIPT.gd
3
3
# ============================================================= #
4
4
# COPYRIGHT NOTICE #
@@ -33,7 +33,6 @@ saveData(# ============================================================= #
33
33
# For inquiries, contact: #
34
34
35
35
# ============================================================= #
36
-
37
36
@icon ("res://Textures/Icons/Script Icons/32x32/world.png" )
38
37
extends Node3D
39
38
Original file line number Diff line number Diff line change 34
34
35
35
# ============================================================= #
36
36
37
- extends Node
37
+ extends Node
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const SAVE_PATH = "res://player.dat"
41
41
var GAME_STATE = "NORMAL"
42
42
var Health := 100
43
43
44
- func SaveData () -> void :
44
+ func saveData () -> void :
45
45
var player = get_node ("/root/World/Player" )
46
46
var playerHead = get_node ("/root/World/Player/Head" )
47
47
var playerCamera = get_node ("/root/World/Player/Head/Camera3D" )
@@ -63,7 +63,7 @@ func SaveData() -> void:
63
63
printerr ("[PlayerData] Player node not found. SaveData failed." )
64
64
65
65
66
- func LoadData () -> void :
66
+ func loadData () -> void :
67
67
var file = FileAccess .open (SAVE_PATH , FileAccess .READ )
68
68
if not file :
69
69
push_warning ("[PlayerData] File doesn't exist (" + SAVE_PATH + ")" )
@@ -104,4 +104,3 @@ func LoadData() -> void:
104
104
THIS MEANS THAT YOUR SCENE NEEDS A ROOT NODE CALLED 'World'
105
105
AND THE PLAYER NEEDS TO BE A CHILD OF THAT ROOT NODE AND CALLED 'Player'." )
106
106
file .close ()
107
-
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ var music_Volume = 1
43
43
var sfx_Volume = 1
44
44
var Master_Volume = 1
45
45
46
- func SaveSettings () -> void :
46
+ func saveSettings () -> void :
47
47
var file = FileAccess .open (SAVE_PATH , FileAccess .WRITE )
48
48
var data = {
49
49
"sfx_Volume" : sfx_Volume ,
@@ -55,7 +55,7 @@ func SaveSettings() -> void:
55
55
file .store_line (jstr )
56
56
print ("[PlayerSettingsData] --Saved Player Settings--" )
57
57
58
- func LoadSettings () -> void :
58
+ func loadSettings () -> void :
59
59
var file = FileAccess .open (SAVE_PATH , FileAccess .READ )
60
60
if not file :
61
61
push_warning ("[PlayerSettingsData] File doesn't exist (" + SAVE_PATH + ")" )
Original file line number Diff line number Diff line change 37
37
extends Node
38
38
39
39
func _ready ():
40
- PlayerData .LoadData ()
41
- PlayerSettingsData .LoadSettings ()
40
+ PlayerData .loadData ()
41
+ PlayerSettingsData .loadSettings ()
42
42
43
43
func saveAllData ():
44
44
PlayerData .saveData ()
You can’t perform that action at this time.
0 commit comments