Пример #1
0
    private IEnumerator IEMobSpawner(float delay, Vector3 location)
    {
        // Play the sound
        spawnSound.Play();

        // Activate the signal
        signal.Activate(location + (Vector3)spawnPrefab.GetComponent <CharacterRenderer>().hull.offset, spawnInterval / 5f);
        SpawnerBallActivate(true);

        yield return(new WaitForSeconds(delay));

        // Spawn the Mob
        Mob mob = SpawnMob(location);

        mobs.Add(mob);

        // Deactivate the signal
        signal.Deactivate();
        SpawnerBallActivate(false);

        yield return(null);
    }
Пример #2
0
 void OnEnable()
 {
     signal.Activate(transform.position + signalOffset, floatDuration * 2);
 }