private void OnTriggerEnter(Collider other) { if (other.gameObject.name == "Center") { Debug.Log("Good!"); // TODO: Add score and recover more blood if (GameDataManager.SuperBird.getInstance().m_CurrentScore++ > GameDataManager.SuperBird.getInstance().m_BestScore) { GameDataManager.SuperBird.getInstance().m_BestScore = GameDataManager.SuperBird.getInstance().m_CurrentScore; } } else { Debug.Log("bad"); // TODO: decrease the blood then show some animation // TODO: Pop Restart Game menu // TODO: GAME STOP isGameRunning = false; ResourceIO.getInstance().LoadResourceToView("UI/EndPanel", this.transform); //startmenu.SetActive(true); } }
public static ResourceIO getInstance() { if (instanceResourceIO == null) { instanceResourceIO = new ResourceIO(); } return(instanceResourceIO); }