Skip to content

Instantly share code, notes, and snippets.

@tkovs
Last active March 26, 2017 20:31
Show Gist options
  • Save tkovs/4eb61a37b44975427fbd158bcaf8b6a7 to your computer and use it in GitHub Desktop.
Save tkovs/4eb61a37b44975427fbd158bcaf8b6a7 to your computer and use it in GitHub Desktop.
Slat's database
using Unity.Engine;
using System.Collections;
public class SlatDatabase : MonoBehaviour
{
private void Start()
{
if (!PlayerPrefs.HasKey("progress"))
{
this.initialize();
}
}
private void initialize()
{
// início de tudo = 0
// na primeira fase (A) = 1
// última fase (Z) = 26
PlayerPrefs.SetInt("progress", 0);
// s_ = stars
// step = A (1), B (2) ... Z (26)
PlayerPrefs.SetInt("s_step1", 0);
// PlayerPrefs.SetInt("s_step2", 0);
// PlayerPrefs.SetInt("s_step3", 0);
PlayerPrefs.SetInt("gender", 0);
// c_ = custom
PlayerPrefs.SetInt("c_shirt", 0);
PlayerPrefs.SetInt("c_hair", 0);
PlayerPrefs.SetInt("c_pants", 0);
PlayerPrefs.SetInt("c_tennis", 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment