示例#1
0
        internal AptWindow(Game game, ContentManager contentManager, AptFile aptFile)
        {
            _game          = game;
            ContentManager = contentManager;
            AssetStore     = game.AssetStore;
            AptFile        = aptFile;

            //Create our context
            _context = new AptContext(this);

            //First thing to do here is to initialize the display list
            Root = new SpriteItem
            {
                Transform          = ItemTransform.None,
                SetBackgroundColor = (c) => _backgroundColor = c
            };
            Root.Create(aptFile.Movie, _context);

            _context.Root = Root;
            _context.Avm.CommandHandler = HandleCommand;

            var m = Root.Character as Movie;

            _movieSize = new Vector2(m.ScreenWidth, m.ScreenHeight);

            Renderer = new AptRenderer(this, contentManager);

            _resolver = new AptCallbackResolver(game);
        }
示例#2
0
        public AptWindow(Game game, ContentManager contentManager, AptFile aptFile)
        {
            _contentManager = contentManager;

            //Create our context
            _context = new AptContext(aptFile, contentManager);

            //First thing to do here is to initialize the display list
            Root = new SpriteItem {
                Transform = ItemTransform.None
            };
            Root.SetBackgroundColor = (c) => _backgroundColor = c;
            Root.Create(aptFile.Movie, _context);
            _context.Root = Root;

            _context.Avm.CommandHandler = HandleCommand;

            AptFile = aptFile;

            Renderer = new AptRenderer(contentManager);

            ImageLoader = new MappedImageLoader(contentManager);

            _resolver = new AptCallbackResolver(game);
        }