private void Start() { uiapi = GameObject.Find("Canvas").GetComponent <UIAPI>(); rapidFire = false; uiapi.SetSliderMax(fireRate); //slider.maxValue = RespawnTime; uiapi.SetSlider(fireRate); //slider.value = RespawnTime; }
// instantiate prefab of projectile, set spawn time to 0 private void ProcessEggSpwan() { Instantiate(EggPreFab, EggFireSpawn.position, EggFireSpawn.rotation); uiapi.SetSlider(0); }