public static PlayerPersistentStats GetPlayerPersistentStats()
 {
     if (playerPersistentStats == null)
     {
         playerPersistentStats = new PlayerPersistentStats();
     }
     return(playerPersistentStats);
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        float   pX      = PlayerPersistentStats.GetPlayerPersistentStats().GetPX();
        float   pY      = PlayerPersistentStats.GetPlayerPersistentStats().GetPY();
        Vector2 loadPos = new Vector2(pX, pY);

        transform.position = loadPos;
    }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         PlayerPersistentStats.GetPlayerPersistentStats().SetPX(0.0f);
         PlayerPersistentStats.GetPlayerPersistentStats().SetPY(0.0f);
         SceneManager.LoadScene(1);
     }
 }