Example #1
0
        protected override void OnHide(object userData)
        {
            base.OnHide(userData);
            //游戏结束
            MainProcedure main = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>();

            main.isSurvival = false;
        }
Example #2
0
        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>();
        }
Example #3
0
 private void Start()
 {
     main = (MainProcedure)GameEntry.Procedure.GetProcedure <MainProcedure>();
 }