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();
 }
Example #2
0
    // 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();
    }
Example #3
0
    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;
    }
Example #4
0
    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>();
    }
Example #5
0
 private void InitCollectablesSpawner()
 {
     collectablesSpawner = new CollectablesSpawner(laneController, collectablesData, holder, collectablesController);
     collectablesSpawner.Init();
     collectablesSpawner.CreateEntities();
 }
Example #6
0
 private void InitObstacleSpawner()
 {
     obstacleSpawner = new ObstacleSpawner(laneController, obstaclesData, holder);
     obstacleSpawner.Init();
     obstacleSpawner.CreateEntities();
 }