mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-25 21:55:55 +00:00
save
This commit is contained in:
parent
06ce5eb44b
commit
8a8872680a
|
|
@ -50,11 +50,10 @@ class Save
|
||||||
/**
|
/**
|
||||||
* Constructing a new Save will load the default values.
|
* Constructing a new Save will load the default values.
|
||||||
*/
|
*/
|
||||||
public function new(data:RawSaveData)
|
public function new(?data:RawSaveData)
|
||||||
{
|
{
|
||||||
this.data = data;
|
if (data == null) this.data = Save.getDefault();
|
||||||
|
else this.data = data;
|
||||||
if (this.data == null) data = Save.getDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDefault():RawSaveData
|
public static function getDefault():RawSaveData
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue