public override void UpdateSpawnerDeath(SwarmSpawner spawner)
 {
     spawners.Remove(spawner);
     if(spawners.Count<=0)
     {
         SceneManager.Instance.GameEnd(true);
     }
 }
Ejemplo n.º 2
0
    public void InitializeSwarmling(SwarmSpawner _SpawnedBy, int _SwarmlingID, CharacterPlayer[] _Players, int _NeighbourLayerMask, float HealthFactor, float PlayerHealFactor)
    {
        SpawnedBy          = _SpawnedBy;
        Players            = _Players;
        SwarmlingID        = _SwarmlingID;
        NeighbourLayerMask = _NeighbourLayerMask;

        SwarmlingHomeAreaCenter = SwarmlingTransform.position;

        HealPlayersOnDeathPerc *= PlayerHealFactor;

        ThisSwarmlingCharacter.SetHealthMax(Mathf.RoundToInt(ThisSwarmlingCharacter.GetHealthMax() * HealthFactor));

        NavPathLightOrb = new NavMeshPath();
    }
Ejemplo n.º 3
0
 private void GetSpawners()
 {
     swarmSpawner = GameObject.Find("SwarmSpawner").GetComponent <SwarmSpawner>();
     gridSpawner  = GameObject.Find("GridSpawner").GetComponent <GridSpawner>();
     lightSpawner = GameObject.Find("LightSpawner").GetComponent <LightSpawner>();
 }
Ejemplo n.º 4
0
 void Awake()
 {
     switch (tag)
     {
         case "Enemy":
             drone = gameObject.GetComponent<DroneBehavior>();
             boxCol = gameObject.GetComponent<BoxCollider>();
             break;
         case "EnemyStructure":
             spawner = gameObject.GetComponent<SwarmSpawner>();
             boxCol = GetComponent<BoxCollider>();
             break;
         case "Soldier":
             soldier = GetComponent<Soldier>();
             soldierManager = GameObject.FindObjectOfType<SoldierManager>();
             break;
         default:
             break;
     }
 }
Ejemplo n.º 5
0
 public virtual void UpdateSpawnerDeath(SwarmSpawner spawner)
 {
 }