Newer
Older
// Removes all active Arrows from the play field at round end.
public class ArrowDespawner : MonoBehaviour, IRoundCallback
{
void Start()
{
RoundController.instance.roundCallbacks.Add(this);
}
public void OnRoundEnd(bool won)
{
ArrowController[] arrows = FindObjectsOfType<ArrowController>();
foreach (ArrowController arrow in arrows)
{
Destroy(arrow.gameObject);
}
}
public void OnRoundStart()
{