// Use this for initialization void Start() { scoreKeep = FindObjectOfType <LevelManger>(); text = GetComponent <Text>(); score = scoreKeep.getScore(); Destroy(scoreKeep.gameObject); }
void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { levelManager.RespawnPlayer(); LevelManger.RespawnPlayer(); } }
private void Start() { if (Instance == null) { Instance = this; PopulateGameBoard(20, 20); } else { Destroy(this); } }
private void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; GameObject.DontDestroyOnLoad(gameObject); } }
// Start is called before the first frame update void Start() { m_Instance = this; if (spawnManager != null) { spawnManager.Startspawner(); } else { Debug.Log("SpawnManager is null"); } }
// Use this for initialization void Start() { levelManger = FindObjectOfType <LevelManger> (); }
// Use this for initialization void Start() { levelManager = FindObjectOfType <LevelManger> (); text = GetComponent <Text> (); }
void Awake() { instance = this; }
// Use this for initialization void Start() { scoreKeep = FindObjectOfType <LevelManger>(); text = GetComponent <Text>(); }
void Start() { scoreGoal = FindObjectOfType <LevelManger>(); }