From 9abd235ed2b9a5c80d5e63d6187d69e9317c2f0d Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Wed, 22 Sep 2021 10:10:50 +0530 Subject: * Initial Commit * Leaderboard Implementation for dreamlo * FlxSave for Player Data * GUID Generation for Unique User --- source/shared/PlayerSave.hx | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 source/shared/PlayerSave.hx (limited to 'source/shared/PlayerSave.hx') diff --git a/source/shared/PlayerSave.hx b/source/shared/PlayerSave.hx new file mode 100644 index 0000000..298eca6 --- /dev/null +++ b/source/shared/PlayerSave.hx @@ -0,0 +1,37 @@ +package shared; + +class PlayerSave +{ + public static final instance:PlayerSave = new PlayerSave(); + + @:isVar public var name(get, set):String; + @:isVar public var guid(get, set):String; + + private function new() {} + + public function setPlayerData(_name:String, _name:String) + { + this.name = _name; + this.guid = _name; + } + + function set_name(name:String):String + { + return this.name = name; + } + + public function get_name() + { + return name; + } + + function set_guid(guid:String):String + { + return this.guid = guid; + } + + public function get_guid() + { + return guid; + } +} -- cgit v1.2.3