void Shoot() { if (seedsLeft > 0) { tempSeed = Instantiate(seed, seedSpawn.transform.position, Quaternion.identity); sp = tempSeed.GetComponent <SeedProjectile>(); sp.multiplier = dammage; sp.Launch(dammage, newValue); newValue = Random.Range(1.0f, 20.0f); seedsLeft--; } }
void TestshooT() { if (seedsLeft > 0) { tempSeed = Instantiate(seed, seedSpawn.transform.position, Quaternion.identity); sp = tempSeed.GetComponent <SeedProjectile>(); sp.multiplier = shootPower; sp.Launch(shootPower, newValue); newValue = Random.Range(1.0f, 20.0f); seedsLeft--; if (seedsLeft == 0) { StartCoroutine(GameOver()); } spring.transform.localPosition = new Vector3(0, 0.7f, 0.45f); shootPower = 0f; } }