Example #1
0
    public void Replay()
    {
        EnemyManager.Reset();
        ParticleDecalManager.Reset();
        ExplosionManager.Reset();
        BulletController[] bullets = FindObjectsOfType <BulletController>();
        foreach (var bullet in bullets)
        {
            bullet.Recycle();
        }
        ParticleController[] particles = FindObjectsOfType <ParticleController>();
        foreach (var particle in particles)
        {
            ParticleManager.Recycle(particle);
        }
        CancerController[] cancers = FindObjectsOfType <CancerController>();
        foreach (var cancer in cancers)
        {
            CancerManager.Recycle(cancer);
        }
        CancerManager.Instance.Deactivate();

        Play();
    }