Esempio n. 1
0
        private void Initialize()
        {
            _transformer          = new WorldToLocalTransformer(transform);
            _planetViewPool       = new SimpleMonoPool <PlanetView>(_planetResources.Prefab);
            _planetExplosionPool  = new SimpleMonoPool <ParticleExplosionController>(_planetResources.ExplosionPrefab);
            _missileExplosionPool = new SimpleMonoPool <ParticleExplosionController>(_missileResources.ExplosionPrefab);

            _ai = new OrbitalityAI();
            for (var i = 0; i < _missileResources.Missiles.Length; i++)
            {
                _missilePools[i] = new SimpleMonoPool <Missile>(_missileResources.Missiles[i]);
            }
            _fireController             = new FireController(_missilePools, _missileExplosionPool, transform);
            _orbitalityUserMissileInput = new OrbitalityUserMissileInput(_fireController, _transformer);
        }
 public OrbitalityUserMissileInput(FireController fireController, WorldToLocalTransformer transformer)
 {
     _fireController = fireController;
     _transformer    = transformer;
 }
Esempio n. 3
0
 //todo: optimize to reduce GC
 public void Tick(List <Planet> planets, FireController fireController)
 {
     switch (planets.Count)
     {
     case 0:
     case 1 when planets[0].IsPlayerControlled: