// Update is called once per frame private void Update() { //means tht it has it loaded if (_gameTime == null) { return; } if (QuestManager == null) { QuestManager = new QuestManager(); } QuestManager.Update(); //if (EnemyManager == null) //{ // EnemyManager = new EnemyManager(); //} //if (GameWasFullyLoadedAnd10SecAgo()) //{ // EnemyManager.Update(); //} AudioCollector.Update(); CreateDummySpawnPoint(); DebugInput(); DebugChangeScreenResolution(); if (Camera.main != null && _culling == null) { //bz camera needs to be initiated already _culling = new Culling(); _fustrum = new Fustrum(); } if (_fustrum != null) { _fustrum.Update(); } if (hud == null) { var hudGO = FindObjectOfType <HUDFPS>(); if (hudGO != null) { hud = hudGO.GuiText; HideShowTextMsg(); } } //if (Input.GetKeyUp(KeyCode.B)) //{ // //_staticBatch = new StaticBatch(); // //_meshBatch = new MeshBatch(); //} }
//Bool method if there is a sphere public bool BoundingVolumeIsView(BoundingSphere sphere) { //The returned fustrum value spehere will not be overlaped between the bounding values return(Fustrum.Contains(sphere) != ContainmentType.Disjoint); }