public void OnTriggerExit(Collider other) { if (other.gameObject.tag == "CheckPoint") { for (int i = 0; i < attributes.Length; i++) { attributes[i].regenValue -= 7; } PlayerSaveAndLoad.Save(); } }
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(); } }
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; }
public void SaveGame() { PlayerSaveAndLoad.playerSaveGame(this); }