void Awake() { cs = GetComponent <CountdownScript>(); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); if (SoundManager.instance == null) { Instantiate(soundManager); } SoundManager.instance.curGame = minigame.conquer; SoundManager.instance.PlayMusic(music); InitSave(); Load(); Save(); }
public void Start() { cs = GameObject.Find("GameManager").GetComponent <CountdownScript>(); ChangeSkillText(); ChangeSkillDescription(); ChangeGunText(); GameObject.Find("Selected Level").GetComponent <Text>().text = "Stage " + (GameManager.instance.level + 1); }
void Start() { cs = GameObject.Find("GameManager").GetComponent <CountdownScript>(); level = GameManager.instance.level; maxhp = 20 + (20 * (level)); hp = maxhp; maxrof = (30f / (level * 0.5f)); rof = maxrof; movespeed = Mathf.Max(5f, Mathf.Log(level, 2f) * 2); bossName = GameObject.Find("EnemyName").GetComponent <Text>(); bossName.text = "Boss Lv" + (level + 1); bossHealthBar = GameObject.Find("EnemyHealth").GetComponent <Slider>(); bossHealthBar.minValue = 0; bossHealthBar.maxValue = maxhp; bossHealthBar.value = hp; }
//this resets the countdown public void resetCountdown() { cs = GameObject.Find("GameManager").GetComponent <CountdownScript>(); cs.countDownDone = false; }
public void setCountdown() { cs = GameObject.Find("GameManager").GetComponent <CountdownScript>(); //countDownDone gets set to true when it is done counting down. cs.countDownDone = true; }
void Start() { originalColor = sprite.color; cs = GameObject.Find("GameManager").GetComponent <CountdownScript>(); Init(); }