コード例 #1
0
 public void OnTriggerExit(Collider other)
 {
     if (other.gameObject.tag == "CheckPoint")
     {
         for (int i = 0; i < attributes.Length; i++)
         {
             attributes[i].regenValue -= 7;
         }
         PlayerSaveAndLoad.Save();
     }
 }
コード例 #2
0
ファイル: PlayerHandler.cs プロジェクト: Nicko141/GameSystems
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("CheckPoint"))
     {
         currentCheckPoint = other.transform;
         for (int i = 0; i < attributes.Length; i++)
         {
             attributes[i].regenValue += 7;
         }
         PlayerSaveAndLoad.Save();
     }
 }
コード例 #3
0
    public void LoadGame()
    {
        PlayerGetData data = PlayerSaveAndLoad.playerLoadGame();

        Vector3 posição;

        posição.x = data.posicao[0];
        posição.y = data.posicao[1];
        posição.z = data.posicao[2];

        transform.position = posição;

        vida = data.vida;
    }
コード例 #4
0
 public void SaveGame()
 {
     PlayerSaveAndLoad.playerSaveGame(this);
 }