using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour
{
    private int lives = 3;

[SerializeField] private GameObject playerPrefab;

[SerializeField] private Transform playerParentTransform;

    // Start is called before the first frame update
    void Start()
    {
    GameObject player = Instantiate (playerPrefab, new Vector3(0,0,0), Quaternion.identity, playerParentTransform);
    }

   public void PlayerDefeated()
   {
       if(lives > 1)
       {
         Debug.Log("GameManager Recorded a Defeated Player.");
         lives--;
       }
       else 
       {
       Debug.Log("Game Over");
       }
   }
}
