Esempio n. 1
0
    private void Awake()
    {
        if (Instance != null)
        {
            Debug.LogError("Only one MapCreation Script can exist at a time.", gameObject);
        }

        Instance = this;
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     playerHealth              = GameObject.Find("Player").GetComponent <PlayerHealth>();
     playerTf                  = GameObject.Find("Player").GetComponent <Transform>();
     playerRb                  = GameObject.Find("Player").GetComponent <Rigidbody>();
     weaponSelectionScript     = GameObject.Find("Player").GetComponent <WeaponSelectionScript>();
     mapCreationScript         = GameObject.Find("MapInstantiator").GetComponent <MapCreationScript>();
     mapCreationScript.enabled = false;
     Time.timeScale            = 0;
     gs = GameState.AtTitle;
     playerRb.constraints = RigidbodyConstraints.FreezeAll;
 }