protected override void OnHide(object userData) { base.OnHide(userData); //游戏结束 MainProcedure main = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>(); main.isSurvival = false; }
protected override void OnShow(object userData) { base.OnShow(userData); bg sceneBackground = FindObjectOfType <bg>(); if (sceneBackground == null) { Debug.LogWarning("Can not find scene background."); return; } data = userData as AsteroidData; if (data == null) { Debug.LogError("Aircraft data is invalid."); return; } random = Random.insideUnitSphere; main = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>(); }
private void Start() { main = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>(); }