// Update is called once per frame void Update() { if (mPlayerInput.Shoot()) { EnemySpawnManager.getInstance().killAllInvisibleEnemies(); } }
public bool destroyIfNotVisible() { if (!Player.getInstance().isObjectVisibleByPlayer(mCollider)) { EnemySpawnManager.getInstance().removeEnemyFromMap(this); GameObject.Destroy(gameObject); return(true); } return(false); }
// Use this for initialization void Start() { EnemySpawnManager.getInstance().addWallBounds(GetComponent <Collider>().bounds); }