private bool isEnemyShooting = true; // flag allows or not to shoot spawning enemy void Awake() { if (instance == null) instance = this; else if (instance != this) Destroy(gameObject); DontDestroyOnLoad(gameObject); nextGoldenScore = goldenScore; // initial first golden Score scoreText.text = "0"; hierarchyGuard = new GameObject("HierarchyGuard").transform; // Get references bulletTime = GetComponent<BulletTime>(); medalAwardingFor = GetComponent<MedalAwardingFor>(); pause = GetComponent<Pause>(); }
void Awake() { if (instance == null) instance = this; else if (instance != this) Destroy(gameObject); DontDestroyOnLoad(gameObject); nextGoldenScore = goldenScore; // initial first golden Score scoreText.text = "0"; hierarchyGuard = new GameObject("HierarchyGuard").transform; // Get references bulletTime = GetComponent<BulletTime>(); medalAwardingFor = GetComponent<MedalAwardingFor>(); pause = GetComponent<Pause>(); }