public override void UpdateSpawnerDeath(SwarmSpawner spawner) { spawners.Remove(spawner); if(spawners.Count<=0) { SceneManager.Instance.GameEnd(true); } }
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(); }
private void GetSpawners() { swarmSpawner = GameObject.Find("SwarmSpawner").GetComponent <SwarmSpawner>(); gridSpawner = GameObject.Find("GridSpawner").GetComponent <GridSpawner>(); lightSpawner = GameObject.Find("LightSpawner").GetComponent <LightSpawner>(); }
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; } }
public virtual void UpdateSpawnerDeath(SwarmSpawner spawner) { }