public SpawnerEntityMissionHelper(SpawnerBase spawner, bool fireVersion = false) { this._spawner = spawner; this._fireVersion = fireVersion; this._ownerEntity = this._spawner.GameEntity; this._gameEntityName = this._ownerEntity.Name; if ((NativeObject)this.SpawnPrefab(this._ownerEntity, this.GetPrefabName()) != (NativeObject)null) { this.SyncMatrixFrames(); } this._spawner.AssignParameters(this); this.CallSetSpawnedFromSpawnerOfScripts(); }
// Use this for initialization void Start() { int maxParticles = GlobalVariables.Instance.SPAWN_COLLISON_MAX_PARTICLES; Transform parent = InGame.Instance.transform.Find("ParticlesGoesHere").transform; mPickupTextManager.Load(maxParticles, parent); mBoltParticleManager.Load(maxParticles, parent); mAS = WorldGen.Instance.BaseSpawner(); mfp = InGameCamera.Instance.GetComponent<FollowPlayer>(); mAS = WorldGen.Instance.BaseSpawner(); Reset(); }
public void Disable() { mWorldGen.StopSpawnSegments(); mBgGen.StopSpawnSegments(); ShowComponents(false); mWorldGen.UnloadSegments(); mBgGen.UnloadSegments(); if (mSpawnerBase != null) { mSpawnerBase.UnloadObjects(); Destroy(mSpawnerBase); mSpawnerBase = null; } AudioManager.Instance.StopMusic(fmodMusic); mStartTime = -1; }
void ActivateCorrectSpawner(Level level) { if (mSpawnerBase != null) { Debug.LogError(" Spawner not removed."); } GameObject astroidSpawnObj = GameObject.Instantiate(mSpawnerPrefabs[(int)level - 1]); astroidSpawnObj.name = mSpawnerPrefabs[(int)level - 1].name; astroidSpawnObj.transform.parent = transform; mSpawnerBase = astroidSpawnObj.GetComponent<SpawnerBase>(); }
private void InitCollectablesSpawner() { collectablesSpawner = new CollectablesSpawner(laneController, collectablesData, holder, collectablesController); collectablesSpawner.Init(); collectablesSpawner.CreateEntities(); }
private void InitObstacleSpawner() { obstacleSpawner = new ObstacleSpawner(laneController, obstaclesData, holder); obstacleSpawner.Init(); obstacleSpawner.CreateEntities(); }