Beispiel #1
0
        public void RegisterLauncher(LauncherConfig launcher)
        {
            if (!_projectilePools.ContainsKey(launcher))
            {
                _projectilePools.Add(launcher, new GameObjectPool <Projectile>(_bulletsRoot.transform, launcher.ProjectilePrefab, 30));
            }

            if (!_explosionPools.ContainsKey(launcher))
            {
                _explosionPools.Add(launcher,
                                    new GameObjectPool <Transform>(_explosionsRoot.transform, launcher.ExplosionPrefab, 30));
            }
        }
Beispiel #2
0
 public Launcher(LauncherConfig config, Transform launchPoint)
 {
     Config      = config;
     LaunchPoint = launchPoint;
     _shootDelay = 1 / config.ShootRate;
 }