Пример #1
0
        public override void LoadContent()
        {
            CustomEffect = GameScreen.Content.Load <Effect>("SpriteShader");

            if (Texture == null)
            {
                Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName));
            }

            BoundingBoxRenderer = new BoundingBoxRenderer(Game);
            BoundingBoxRenderer.Initialize();

            if (AttachedPathingNode != null)
            {
                AttachedPathingNode.Initialize();
            }

            base.LoadContent();
        }
Пример #2
0
        public override void LoadContent()
        {
            if (RenderWindow == null)
            {
                RenderWindow = Globals.RenderWindow;
            }

            if (BoundingBoxRenderer == null)
            {
                BoundingBoxRenderer             = new BoundingBoxRenderer(Game);
                BoundingBoxRenderer.SpriteBatch = SpriteBatch;
                BoundingBoxRenderer.Initialize();
            }

            if (ClipPlayer.Texture == null)
            {
                ClipPlayer.Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(SpriteSheetFileName));
            }

            base.LoadContent();
        }
Пример #3
0
        public override void LoadContent()
        {
            if (RenderWindow == null)
            {
                RenderWindow = Globals.RenderWindow;
            }

            CustomEffect = GameScreen.Content.Load <Effect>("SpriteShader");

            OnClick += OnButtonClicked;

            if (Texture == null)
            {
                Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice,
                                                   Globals.GetDestinationTexturePath(AssetName));
            }

            BoundingBoxRenderer = new BoundingBoxRenderer(Game);
            BoundingBoxRenderer.Initialize();

            base.LoadContent();
        }
Пример #4
0
        public override void LoadContent()
        {
            Globals.OnSceneEvent += OnSceneEvent;

            if (RenderWindow == null)
            {
                RenderWindow = Globals.RenderWindow;
            }

            if (Texture == null)
            {
                Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice,
                                                   Globals.GetDestinationTexturePath(AssetName));
            }

            if (BoundingBoxRenderer == null)
            {
                BoundingBoxRenderer             = new BoundingBoxRenderer(Game);
                BoundingBoxRenderer.SpriteBatch = SpriteBatch;
                BoundingBoxRenderer.Initialize();
            }

            base.LoadContent();
        }