Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fabio-Maddaluno
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fabio
Fabio-Maddaluno
Commits
cec6d9c6
Commit
cec6d9c6
authored
4 years ago
by
Fabio
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
754f4805
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Highscore.gd
+29
-0
29 additions, 0 deletions
Highscore.gd
with
29 additions
and
0 deletions
Highscore.gd
0 → 100644
+
29
−
0
View file @
cec6d9c6
extends
Node
var
bestscore
=
0
setget
set_Highscore
const
filepath
=
"user://Highscore.txt"
func
_ready
():
load_Highscore
()
pass
func
load_Highscore
():
var
file
=
File
.
new
()
if
not
file
.
file_exists
(
filepath
):
return
file
.
open
(
filepath
,
File
.
READ
)
bestscore
=
file
.
get_var
()
file
.
close
()
pass
func
save_Highscore
():
var
file
=
File
.
new
()
file
.
open
(
filepath
,
File
.
WRITE
)
file
.
store_var
(
bestscore
)
file
.
close
()
pass
func
set_Highscore
(
new_value
):
bestscore
=
new_value
save_Highscore
()
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment