private void OnFrameTransfering(GameFrameTransferEvent gameFrameTransferEvent)
        {
            if (FrameTransfering != null)
            {
                FrameTransfering(this, gameFrameTransferEvent);
            }

            // 销毁当前frame的资源
            foreach (var frame in currentFrames)
            {
                frame.Destroyed();
            }
            currentFrames.Clear();
        }
        private void OnFrameTransfered(GameFrameTransferEvent gameFrameTransferEvent)
        {
            if (FrameTransfered != null)
            {
                FrameTransfered(this, gameFrameTransferEvent);
            }

            // 加载frame的资源
            if (registeredFrames.ContainsKey(gameFrameTransferEvent.frameType))
            {
                foreach (var typeFrame in registeredFrames[gameFrameTransferEvent.frameType])
                {
                    IGameFrame frame = (IGameFrame)Activator.CreateInstance(typeFrame);
                    if (frame != null)
                    {
                        frame.LoadFrame();
                        currentFrames.Add(frame);
                    }
                }
            }
        }