Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public void Start()
 {
     cs = GameObject.Find("GameManager").GetComponent <CountdownScript>();
     ChangeSkillText();
     ChangeSkillDescription();
     ChangeGunText();
     GameObject.Find("Selected Level").GetComponent <Text>().text = "Stage " + (GameManager.instance.level + 1);
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 //this resets the countdown
 public void resetCountdown()
 {
     cs = GameObject.Find("GameManager").GetComponent <CountdownScript>();
     cs.countDownDone = false;
 }
Exemplo n.º 5
0
 public void setCountdown()
 {
     cs = GameObject.Find("GameManager").GetComponent <CountdownScript>();
     //countDownDone gets set to true when it is done counting down.
     cs.countDownDone = true;
 }
Exemplo n.º 6
0
 void Start()
 {
     originalColor = sprite.color;
     cs            = GameObject.Find("GameManager").GetComponent <CountdownScript>();
     Init();
 }