public override void Init()
        {
            _windowTarget = EngineGlobals.GameReference.AssetManager.CreateTargetObject("{achievementgenerator" + instanceNumber + "}", WIDGET_WIDTH, WIDGET_HEIGHT);

            _displayFont = EngineGlobals.GameReference.AssetManager.GetFont("{smallfont}");
            _windowTexture = EngineGlobals.GameReference.AssetManager.CreatePixelTexture("{awind_texture}");

            _achievementTexture = EngineGlobals.GameReference.AssetManager.GetTexture("{achievement}");

            _windowTarget.RunTarget(GenerateWidget);

            Show();
        }
        public override void LoadContent()
        {
            pony1 = EquestriEngine.AssetManager.CapturedFrame;
            Objects.Graphics.Misc.TextureLoadList list;
            Objects.Graphics.Misc.TextureLoadList.LoadList(out list, "debug_BattleScreen");
            EquestriEngine.AssetManager.LoadFromLoadList(list);

            #if DEBUG
            _battleStage = EquestriEngine.AssetManager.GetTexture("{debug_stage}");
            #endif

            base.LoadContent();
            _controller.Init();
        }
        public static void GenerateTextureObjectFromMethod(TargetObject input, out TextureObject output,string name, System.Action<Equestribatch> method, Color? color = null,EffectObject effect = null)
        {
            input.RunTarget(method,color,effect);

            output = new TextureObject(name, input.Texture,true);
        }
        public override void LoadContent()
        {
            //_messageBoxWindow = Systems.AssetManager.GetTexture("message_box");
            if (_messageBoxWindowTexture == null)
            {
                _messageBoxWindowTexture = new TextureObject("message_box", @"Graphics\UI\MessageBox");
                _nameBoxWindowTexture = new TextureObject("name_box", @"Graphics\UI\namebox");
                _continueArrowTexture = new TextureObject("continue_arrow", @"Graphics\UI\textbox_arrow");
            }

            _messageBoxFont = EquestriEngine.AssetManager.GetFont("{largefont}");
            boxOrigin = new Vector2(_messageBoxWindowTexture.Width / 2, _messageBoxWindowTexture.Height / 2);
            name = "Fluttershy";
            if (name != null)
            {
                _nameBoxWindow = EquestriEngine.AssetManager.CreateTargetObject("{namebox_texture}", (int)_messageBoxFont.Measure(name).X + 50, 74);
                _nameBoxWindow.RunTarget(DrawNameBox, Color.Transparent);
            }
            base.LoadContent();
        }
        public override void LoadContent()
        {
            pony1 = EngineGlobals.AssetManager.CapturedFrame;
            TextureLoadList list;
            TextureLoadList.LoadList(out list, "debug_BattleScreen");
            EngineGlobals.AssetManager.LoadFromLoadList(list);

            #if DEBUG
            _battleStage = EngineGlobals.AssetManager.GetTexture("{debug_stage}");
            #endif

            _controller.Init();
        }
        protected override void LoadContent()
        {
            base.LoadContent();
            _systemReady = true;

            try
            {
                FromInternal("{error}", "Error.derpyeyes");
                FromInternal("{notex}", "Error.notexture");
                FromInternal("{achievement}", "Data.achievements");
                FromInternal("{bits}", "UI.bitcollection");
                FromInternal("{load}", "Loading.loadingscreen_filler");

                var Effect = new Objects.Graphics.BasicEffectObject("{basic_effect}");

                var smallFont = new FontObject("{smallfont}", @"fonts\celestia_redux");
                _fonts["{smallfont}"] = smallFont;
                var largeFont = new FontObject("{largefont}", @"fonts\celestia_redux_large");
                _fonts["{largefont}"] = largeFont;

                _frameCapture = new TargetObject("{screen}", GraphicsDevice, EngineGlobals.Settings.WindowWidth, EngineGlobals.Settings.WindowHeight);
                _empty = CreatePixelTexture("{empty}", Color.Transparent);
                _singleWhite = CreatePixelTexture("{single}");
            }
            catch (System.Exception ex)
            {
                EquestriEngine.ErrorMessage = ex.Message;
            }

            LoadTextures();
            LoadFonts();
            LoadEffects();
            LoadSkeletons();
        }
 public TextureObject CreateTextureObjectFromTarget(string name, TargetObject target)
 {
     if (!_systemReady)
         throw new EngineException("System not ready for creation", true);
     if (!_textures.ContainsKey(name))
     {
         TextureObject newTexture = new TextureObject(name, target.Texture);
         _textures[name] = newTexture;
         return newTexture;
     }
     else
     {
         return _textures[name];
     }
 }
 public TargetObject CreateTargetObject(string name, int width, int height)
 {
     if (!_systemReady)
         throw new EngineException("System not ready for creation", true);
     if (!_textures.ContainsKey(name))
     {
         TargetObject newTarget = new TargetObject(name, GraphicsDevice, width, height);
         _textures[name] = newTarget;
         return newTarget;
     }
     else
     {
         return _textures[name] as TargetObject;
     }
 }
 protected override void LoadContent()
 {
     _windowTexture = EngineGlobals.GameReference.AssetManager.CreatePixelTexture("{console}");
     _renderedText = EngineGlobals.GameReference.AssetManager.CreateTargetObject("{rendred_text}", EngineGlobals.Settings.WindowWidth, 256);
     base.LoadContent();
 }
Exemple #10
0
        public static void GenerateTextureObjectFromMethod(TargetObject input, out TextureObject output, string name, System.Action <Equestribatch> method, Color?color = null, EffectObject effect = null)
        {
            input.RunTarget(method, color, effect);

            output = new TextureObject(name, input.Texture, true);
        }