示例#1
0
        public static GameoverEventArgs Create(EnumGameOverType enumGameOverType, int starCount, object userData = null)
        {
            GameoverEventArgs gameoverEventArgs = ReferencePool.Acquire <GameoverEventArgs>();

            gameoverEventArgs.EnumGameOverType = enumGameOverType;
            gameoverEventArgs.StarCount        = starCount;
            return(gameoverEventArgs);
        }
        private void OnGameOver(object sender, GameEventArgs e)
        {
            GameoverEventArgs ne = (GameoverEventArgs)e;

            if (ne == null)
            {
                return;
            }

            levelControl.Gameover(ne.EnumGameOverType, ne.StarCount);
        }