private void AttemptMissileFire() { if (missiles < 0) { return; //If no missiles then don't fire } //Spawn missile //Update scoreboard missiles--; scoreBoard.ChangeMissiles(missiles); }
// Use this for initialization void Start() { guns = transform.GetComponentsInChildren <ParticleSystem>(); scoreBoard = FindObjectOfType <ScoreBoard>(); scoreBoard.ChangeMissiles(missiles); }