public void RemoveAlly(EntityBaseEnemy ally) { if (alliesInStage == null) { return; } alliesInStage.Remove(ally); }
public void RemoveEnemy(EntityBaseEnemy enem) { if (enemiesInStage == null) { return; } enemiesInStage.Remove(enem); }
public void RegisterAlly(EntityBaseEnemy ally) { if (alliesInStage == null) { alliesInStage = new List <EntityBaseEnemy> (); } alliesInStage.Add(ally); }
public void RegisterEnemy(EntityBaseEnemy enem) { if (enemiesInStage == null) { enemiesInStage = new List <EntityBaseEnemy> (); } enemiesInStage.Add(enem); }
GameObject InstantiateEntityGoFromPathEntityType(PathEntityType type) { GameObject ret = null; switch (type) { case PathEntityType.PATH_ENTITY_TYPE_PLAYER: ret = Instantiate(LevelCreatorEditor.Instance.GetPlayerPrefab(), Vector3.zero, Quaternion.identity); EntityPlayer e_p = ret.AddComponent <EntityPlayer>(); e_p.Init(this); break; case PathEntityType.PATH_ENTITY_TYPE_BASE_ENEMY: ret = Instantiate(LevelCreatorEditor.Instance.GetBaseEnemyPrefab(), Vector3.zero, Quaternion.identity); EntityBaseEnemy e_b = ret.AddComponent <EntityBaseEnemy>(); e_b.Init(this); break; } return(ret); }
public override void OnStart() { curr_enemy_lifes = enemy_lifes; enemy_dead = false; lose = false; path.ReloadPath(); grid.ReloadGrid(); player = (EntityPlayer)path.GetGameEntityByEntityType(EntityPathInstance.PathEntityType.PATH_ENTITY_TYPE_PLAYER); enemy = (EntityBaseEnemy)path.GetGameEntityByEntityType(EntityPathInstance.PathEntityType.PATH_ENTITY_TYPE_BASE_ENEMY); if (player != null) { player.SetBullets(bullets); } if (enemy != null) { enemy.SetLifePoints(enemy_lifes); } }
public void RegisterPlayer(EntityBaseEnemy ply) { playerReference = ply; }