예제 #1
0
        public void LoadContent(ContentLoader content)
        {
            myEffect = content.ContentManager.Load<ParticleEffect>(name);

            myEffect.LoadContent(content.ContentManager);
            myEffect.Initialise();
            myRenderer.LoadContent(content.ContentManager);
        }
        public override void Initialise()
        {
            base.Initialise();

            m_ParticleEffect = LoadParticleEffect(m_Name);

            if (m_ParticleEffect != null)
                m_ParticleEffect.Initialise();
        }
예제 #3
0
 public ParticleEntity(Screen.GameScreen screen, string effectName)
     : base(screen)
 {
     abyss = screen.Game;
     gameScreen = screen;
     Effect = abyss.Content.Load<ParticleEffect>(effectName).DeepCopy();
     Effect.Initialise();
     Effect.LoadContent(abyss.Content);
 }
        public void LoadContent(ContentManager content)
        {
            flameEffect = content.Load<ParticleEffect>("Particles\\flameEffect");
            flameEffect.LoadContent(content);
            flameEffect.Initialise();
            explosionEffect = content.Load<ParticleEffect>("Particles\\explosionEffect");
            explosionEffect.LoadContent(content);
            explosionEffect.Initialise();

            particleRenderer.LoadContent(content);
        }
예제 #5
0
        public void LoadContent()
        {
            if (ContentLoaded)
                return;

            ParticleEffect model = EphemereGames.Core.Persistence.Persistence.GetAsset<Particle>(Name).Model;

            Model = model.DeepCopy();

            Model.Initialise();

            ContentLoaded = true;
        }
        public ParticleEffectComponent(Engine engine, string effectName, Vector2 initialPosition)
            : base(engine)
        {
            DrawParticleEffect = true;
              particleEffectName = effectName;
              this.Position = initialPosition;

              particleEffect = Engine.Content.Load<ParticleEffect>(@"ParticleEffects\" + particleEffectName);
              particleEffect.LoadContent(Engine.Content);
              particleEffect.Initialise();

              DrawOrder = int.MaxValue - 1;

              Engine.AddComponent(this);
        }
예제 #7
0
        public override void Load(LoadManager content)
        {
            base.Load(content);

            mParticleEffect = MilkShake.ConentManager.Load<ParticleEffect>(mAssetURL).DeepCopy(); // Deep Copy to stop referances
            mParticleEffect.Initialise();

            foreach (Emitter emitter in mParticleEffect)
            {
                // Fix
                emitter.ParticleTexture = MilkShake.ConentManager.Load<Texture2D>("distort_part");
                if (!emitter.Initialised) emitter.Initialise();
                //EmitterBlendMode.
            }
        }
예제 #8
0
        protected override void LoadContent()
        {
            // Todo:
            // Load the particle effect called "Sun" and assign it to the _sunParticleEffect field. Load the texture called "TriangleParticle"
            //  and assign it to the ParticleTexture property of the first emitter in the _sunParticleEffect instance.
            _sunParticleEffect = Content.Load<ParticleEffect>("Sun");
            var triangleTexture = Content.Load<Texture2D>("TriangleParticle");

            _sunParticleEffect[0].ParticleTexture = triangleTexture;
            _sunParticleEffect.Initialise();
            // Hint:
            // In Mercury, you can access the emitters of a particle system using array notation, i.e.
            //  emitter[0], emitter[1] etc.
            // This is just because of the way Mercury implements the ParticleEffect class. Its not something you need to know right now, but
            //  it inherits from a collection class which overloads the [] operator.
        }
예제 #9
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // load particle effects
            myEffect = Content.Load<ParticleEffect>(@"EffectLibrary\CampFire");
            myEffect.LoadContent(this.Content);
            myEffect.Initialise();
            myRenderer.LoadContent(Content);

            Camera = new Camera2d();
            Camera.Pos = new Vector2(400.0f, 400.0f);

            meteoros = new Meteor(Content.Load<Texture2D>("Sprites\\meteoro_teste"));

            NaveFilho_1 = new NaveFilho(Content.Load<Texture2D>("Sprites\\StarShip_Filho"), viewportRect.Width / 2);//, 1);

            NaveFilho_2 = new NaveFilho(Content.Load<Texture2D>("Sprites\\StarShip_Filho"), viewportRect.Width / 2 + 200);//, 2);

            //NaveFilho.Velocidade *= -1;

            shipCannon = new shipCannon(Content.Load<Texture2D>("Sprites\\shipCannon"));
            shipCannon2 = new shipCannon(Content.Load<Texture2D>("Sprites\\shipCannon"));

            HUD = Content.Load<SpriteFont>("Fonts\\HUD");

            meteorTexture = Content.Load<Texture2D>("Sprites\\meteoro_teste");
            //meteorTexture = Content.Load<Texture2D>("Sprites\\1");

            Debug = Content.Load<SpriteFont>("Fonts\\Score");

            Fundo = Content.Load<Texture2D>("Sprites\\background");

            elementoBen = new elementoBenefico(Content.Load<Texture2D>("Sprites\\insgrocha"), Content.Load<Texture2D>("Sprites\\insignacoracao"));

            shipCannon2.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 + 110,
               Window.ClientBounds.Height - 100);

            shipCannon.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 - 65,
                Window.ClientBounds.Height - 120);

            shipCannon.center = new Vector2(shipCannon.sprite.Width / 2, shipCannon.sprite.Height / 2 - 30);
        }
예제 #10
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // load particle effects
            myEffect = Content.Load<ParticleEffect>(@"EffectLibrary\BasicExplosion");
            myEffect.LoadContent(this.Content);
            myEffect.Initialise();
            myRenderer.LoadContent(Content);

            shipCannon = new GameObject(Content.Load<Texture2D>("Sprites\\shipCannon"));

            // shipCannon2 = new GameObject(Content.Load<Texture2D>("Sprites\\shipCannon"));

            HUD = Content.Load<SpriteFont>("Fonts\\HUD");

            meteorTexture = Content.Load<Texture2D>("Sprites\\Meteorito");

            Debug = Content.Load<SpriteFont>("Fonts\\Score");

            Fundo = Content.Load<Texture2D>("Sprites\\fundo");

            shipCannon2 = new GameObject(Content.Load<Texture2D>("Sprites\\shipCannon"));

            shipCannon2.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 + 110,
               Window.ClientBounds.Height - 100);


            shipCannon.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 - 80,
                Window.ClientBounds.Height - 100);

            //shipCannon2.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2  + 100,
            //Window.ClientBounds.Height - 20);

            viewportRect = new Rectangle(0, 0, graphics.GraphicsDevice.Viewport.Width,
                graphics.GraphicsDevice.Viewport.Height);





        }
예제 #11
0
        public PlayerShip(Game game, Vector2 position)
        {
            Game = game;
            _soundBank = Game.Services.GetService<SoundBank[]>();
            _world = Game.Services.GetService<World>();
            krypton = Game.Services.GetService<KryptonEngine>();

            thrustLR = _soundBank[0].GetCue("thrust01");
            thrustLR.Play();
            thrustLR.Pause();

            thrustUD = _soundBank[0].GetCue("thrust01");
            thrustUD.Play();
            thrustUD.Pause();

            Position = position;
            _particleRenderer = Game.Services.GetService<SpriteBatchRenderer>();
            //_textures = Game.Services.GetService<Textures>();

            //Loadcontentstuff
            _shiptxture = Game.Content.Load<Texture2D>("player_ship");
            _turretTxture = Game.Content.Load<Texture2D>(".\\guns\\turret01");
            _centreVect = new Vector2(_shiptxture.Width / 2, _shiptxture.Height / 2);

            ProximityBox = new Rectangle(0, 0, _shiptxture.Width+Globals.PhysBuffer, _shiptxture.Height + Globals.PhysBuffer);

            //make ship fixture in for farseer
            box = BodyFactory.CreateCircle(_world, ConvertUnits.ToSimUnits(_shiptxture.Width / 2), 7.0f);
            box.BodyType = BodyType.Dynamic;
            box.Restitution = 0.5f;
            box.Friction = 0.2f;
            box.FixedRotation = true;
            box.LinearDamping = 0.4f;
            box.Position = ConvertUnits.ToSimUnits(Position.X + _centreVect.X, Position.Y + _centreVect.Y);
            box.UserData = "player";

            //box.OnCollision += Collide;
            box.OnSeparation += Collide;

            //make light in krypton
            var mLightTexture = LightTextureBuilder.CreateConicLight(Game.GraphicsDevice, 256, 2.0f);
            light = CreateLights(mLightTexture,400);
            var mLightTexture2 = LightTextureBuilder.CreatePointLight(Game.GraphicsDevice, 64);
            light2 = CreateLights(mLightTexture2,200);

            //set up thruster particle
            _thrustparticle = Game.Content.Load<ParticleEffect>(".\\mercury\\thruster");
            _thrustparticle.LoadContent(Game.Content);
            _thrusterEmitter = (ConeEmitter)_thrustparticle[0];
            //_thrusterEmitter.Initialise();
            _thrusterEmitter.ParticleTexture = Game.Content.Load<Texture2D>(".\\mercury\\Particle004");
            _thrustparticle.Initialise();
            _particleRenderer.LoadContent(Game.Content);

            //_centerVect = new Vector2(_shiptxture.Width / 2,_shiptxture.Width / 2);
            currentWeapon = new Gun(Game, true, BulletsStats.Plasma01);
        }
 public void LoadFromFile(Game game, string path)
 {
     effect = game.Content.Load<ParticleEffect>(path);
     effect.LoadContent(game.Content);
     effect.Initialise();
 }
예제 #13
0
        protected override void LoadContent()
        {
            // Rendering inits.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            kinectRGBVideo.Texture = new Texture2D(GraphicsDevice, gameWidth, gameHeight, false, SurfaceFormat.Color);

            // Game Set inits.
            initGameSetList();
            generateGameSet();

            // Load sounds
            correct_snd = new GameSFX(Content.Load<SoundEffect>("kling"));

            //Loads the background music and plays it
            GameMusic background = new GameMusic(Content.Load<Song>("background_music3"));
            background.PlayLooping();

            particleRenderer.LoadContent(Content);

            particleEffect = Content.Load<ParticleEffect>(("BasicExplosion"));
            particleEffect.LoadContent(Content);
            particleEffect.Initialise();

            /*
            //skeleton right hand
            GameTextureInstance texture = GameTextureInstance.CreateBlank(GraphicsDevice, 20, 20);
            texture.Position = new Vector2(0, 0);
            texture.Alpha = 1;
            texture.Color = Color.Orange;
            skeletonSpots.Add(texture);

            //Left hand
            texture = GameTextureInstance.CreateBlank(GraphicsDevice, 20, 20);
            texture.Position = new Vector2(0, 0);
            texture.Alpha = 1;
            texture.Color = Color.BlueViolet;
            skeletonSpots.Add(texture);

            //hotspots
            texture = GameTextureInstance.CreateBlank(GraphicsDevice, HotSpotSizes, HotSpotSizes);
            texture.Position = new Vector2(EdgeOffset);
            texture.Alpha = HotSpotAlpha;
            hotSpots.Add(texture);

            texture = GameTextureInstance.CreateBlank(GraphicsDevice, HotSpotSizes, HotSpotSizes);
            texture.Position = new Vector2(GraphicsDevice.Viewport.Width - texture.Texture.Width - EdgeOffset, EdgeOffset);
            texture.Alpha = HotSpotAlpha;
            hotSpots.Add(texture);

            texture = GameTextureInstance.CreateBlank(GraphicsDevice, HotSpotSizes, HotSpotSizes);
            texture.Position = new Vector2(10, GraphicsDevice.Viewport.Height - texture.Texture.Height - EdgeOffset);
            texture.Alpha = HotSpotAlpha;
            hotSpots.Add(texture);

            texture = GameTextureInstance.CreateBlank(GraphicsDevice, HotSpotSizes, HotSpotSizes);
            texture.Position = new Vector2(GraphicsDevice.Viewport.Width - texture.Texture.Width - EdgeOffset, GraphicsDevice.Viewport.Height - texture.Texture.Height - EdgeOffset);
            texture.Alpha = HotSpotAlpha;
            hotSpots.Add(texture);

            //debug textures
            GameTextureInstance rectTexture = GameTextureInstance.CreateBlank(GraphicsDevice, 80, 80);
            rectTexture.Alpha = 0.3f;
            rectTexture.Color = Color.HotPink;
            debugSpots.Add(rectTexture);

            rectTexture = GameTextureInstance.CreateBlank(GraphicsDevice, 80, 80);
            rectTexture.Alpha = 0.3f;
            rectTexture.Color = Color.HotPink;
            debugSpots.Add(rectTexture);

            ResetSquareColors();
            */
        }
예제 #14
0
파일: Snake.cs 프로젝트: eogas/snake
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            sfScore = Content.Load<SpriteFont>("ScoreFont");
            sfSplash = Content.Load<SpriteFont>("SplashFont");

            Vector2 tmpVec = sfSplash.MeasureString("SNAKE");
            splashVec = new Vector2((graphics.GraphicsDevice.Viewport.Width / 2.0f) - (tmpVec.X / 2.0f), 0);

            tmpVec = sfScore.MeasureString("Press 'SpaceBar' to Play");
            enterVec = new Vector2((graphics.GraphicsDevice.Viewport.Width / 2.0f) - (tmpVec.X / 2.0f),
                graphics.GraphicsDevice.Viewport.Height - tmpVec.Y);

            blockTexture = Content.Load<Texture2D>("block");
            explode = Content.Load<ParticleEffect>("BasicExplosion");
            explode.LoadContent(Content);
            explode.Initialise();

            renderer.LoadContent(Content);
        }
예제 #15
0
 public void Load(string _fileName)
 {
     fileName = _fileName;
     effect = Content.Load<ParticleEffect>(fileName);
     effect.LoadContent(Content);
     effect.Initialise();
     renderer.LoadContent(Content);
 }
예제 #16
0
        public GOEffect(GraphicsDeviceManager _graphics, ContentManager _Content, string _fileName)
        {
            graphics = _graphics;
            Content = _Content;

            renderer = new SpriteBatchRenderer { GraphicsDeviceService = graphics };
            effect = new ParticleEffect();
            fileName = _fileName;

            effect = Content.Load<ParticleEffect>(fileName);
            effect.LoadContent(Content);
            effect.Initialise();
            renderer.LoadContent(Content);
            Visible = true;
        }
예제 #17
0
        protected void LoadContent(bool loadAllContent)
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            levelOneTrue = 0;
            levelTwoTrue = 0;
            //load bbox images
            torch = Content.Load<Texture2D>("torch");
            fountain = Content.Load<Texture2D>("fountain");

            //load level images
            level1 = Content.Load<Texture2D>("level1");
            level2 = Content.Load<Texture2D>("level2");

            //load item bboxs
            torchBbox1 = new Bbox(torch, 600, 150, "fire");
            torchBbox2 = new Bbox(torch, 150, 150, "fire");
            fountainBbox = new Bbox(fountain, 250, 220, "water");

            //load levels
            levelOne = new Level(level1);
            levelTwo = new Level(level2);

            //right hand
            rightHand = new Bbox(handImage, righthandPosition.X, righthandPosition.Y, "normal");

            //fill level bbox lists
            levelOne.addBbox(torchBbox1);
            levelOne.addBbox(torchBbox2);
            levelTwo.addBbox(fountainBbox);

            //create tasks
            levelOneT1 = new CollisionTask(rightHand, torchBbox1, "fire");
            levelOneT2 = new CollisionTask(rightHand, torchBbox2, "fire");
            levelTwoT1 = new CollisionTask(rightHand, fountainBbox, "water");

            //level one tasks
            levelOne.addTask(levelOneT1);
            levelOne.addTask(levelOneT2);

            //level two tasks
            levelTwo.addTask(levelTwoT1);

            myEffect = Content.Load<ParticleEffect>("handflame");
            myEffect.LoadContent(Content);
            myEffect.Initialise();

            waterEffect = Content.Load<ParticleEffect>("WaterJet");
            waterEffect.LoadContent(Content);
            waterEffect.Initialise();

            smokeEffect = Content.Load<ParticleEffect>("BasicSmokePlume");
            smokeEffect.LoadContent(Content);
            smokeEffect.Initialise();
            myRenderer.LoadContent(Content);

            //Load the sound file using Content.Load
            roomTone = Content.Load<SoundEffect>("kinectFinal--soundScape");
            fireSound = Content.Load<SoundEffect>("fx_fire_embers_01_a_lp");
            waterSound = Content.Load<SoundEffect>("amb_water_river_lp");
            instance1 = roomTone.CreateInstance();
            fireInstance = fireSound.CreateInstance();
            waterInstance = waterSound.CreateInstance();

            instance1.IsLooped = true;
            waterInstance.IsLooped = true;
            fireInstance.IsLooped = true;

            instance1.Play();
        }
예제 #18
0
        /// <summary>C:\Users\John Getty\Desktop\MPE\ParticleTextures\Particle001.png
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            _renderer =new BillboardRenderer {GraphicsDeviceService = _graphics};

            var colors = new[]
                                   {
                                       Color.Pink.ToVector3(), Color.Yellow.ToVector3(), Color.Lavender.ToVector3(),
                                       Color.Salmon.ToVector3()
                                   };
            _manager = new ParticleEffectManager(_renderer);
            for (int i = 0; i < 4; i++)
            {
                _emitters[i] = new SphereEmitter
                                   {
                                       Radius = 10,
                                       Radiate = true,
                                       Budget = 16384,
                                       ReleaseColour = colors[i],
                                       ReleaseQuantity = 50/(i+1),
                                       BlendMode = EmitterBlendMode.Add,
                                       ReleaseSpeed =  .2f * (4-i),
                                       ReleaseOpacity = .1f,
                                       ReleaseScale = (i+1) * 5 *.02f,
                                       Term = 1,
                                   };

                if (i==1)
                {
                    _emitters[i].Modifiers.Add(new LinearGravityModifier { Gravity = new Vector3(-2, -2, 0) });
                    _emitters[i].Modifiers.Add(new OpacityModifier {Initial = 0.2f, Ultimate = 0f});
                }
                if (i==2)
                {
                    _emitters[i].Modifiers.Add(new LinearGravityModifier { Gravity = new Vector3(1, -1, 0) });
                    _emitters[i].Modifiers.Add(new ColourModifier
                                                   {
                                                       InitialColour = Color.Red.ToVector3(),
                                                       UltimateColour = Color.White.ToVector3()
                                                   });
                    _emitters[i].Modifiers.Add(new OpacityModifier {Initial = 0.4f, Ultimate = 0f});
                   
                }
            }
            _effect = new ParticleEffect { _emitters[0], _emitters[1], _emitters[2], _emitters[3] };
            _effect.Initialise();

            _manager.Add(_effect);



            _projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver2, _graphics.GraphicsDevice.Viewport.AspectRatio, 1f, 500f);


            base.Initialize();
        }
예제 #19
0
        private void AddParticleEffect(ParticleEffect particleEffect, ICollidableTile trackingObject)
        {
            particleEffect.LoadContent(m_game.Content);

            particleEffect.Initialise();

            var entry = new LightCausingParticleObject(particleEffect, m_particleRenderer,
            new PointLight()
            {
               Colour = Color.Orange,
               LightIntensity = 4,
               LightRadius = 25,
               LightPosition = new Vector3(300, 160, -100)
            }, trackingObject)
            {
                Name = "FlameThrower",
                Enabled = false
            };

            ParticleEffects.Add(entry);
        }
예제 #20
0
        protected virtual void loadContent(ContentManager content)
        {
            player.loadContent(content);
            scenario.loadContent(content);

            sf = content.Load<SpriteFont>("Fonts/gamefont");

            if (background == null)
            {
                background = content.Load<Texture2D>("Levels/FondoTest");
            }

            foreach (Collectible c in collectibles)
            {
                c.loadContent(content);
            }

            myEffect = content.Load<ParticleEffect>(@"Particles/BasicExplosion");
            myEffect.LoadContent(content);
            myEffect.Initialise();
            myRenderer.LoadContent(content);
            sbRenderer.LoadContent(content);

            special = new SpriteSheet(ScreenManager.Game, content.Load<Texture2D>("collectiblePez"), 2,2, ScreenManager.SpriteBatch);
            special.scale = 40f / special.frameWidth;

            simple = new SpriteSheet(ScreenManager.Game, content.Load<Texture2D>("collectibleLeche"), 2, 2, ScreenManager.SpriteBatch);
            simple.scale = 40f / simple.frameWidth;
            simple.gotoAndStop(1);

            debugView.LoadContent(ScreenManager.Game.GraphicsDevice, content);
        }
예제 #21
0
파일: Box.cs 프로젝트: jpann/BoxExample
        /// <summary>
        /// Called when graphics resources need to be loaded. Override this method to load any component-specific graphics resources.
        /// </summary>
        protected override void LoadContent()
        {
            mScreenCenter = new Vector2(mGraphics.GraphicsDevice.Viewport.Width / 2f,
                                        mGraphics.GraphicsDevice.Viewport.Height / 2f);

            mTexture = mContentManager.Load<Texture2D>(@"Content\Textures\boxSprite");
            mWidth = ConvertUnits.ToSimUnits(mTexture.Width);
            mHeight = ConvertUnits.ToSimUnits(mTexture.Height);
            mOrigin = new Vector2(mWidth / 2, mHeight / 2);

            mPosition = ConvertUnits.ToSimUnits(mScreenCenter.X, mScreenCenter.Y);
            mBody = BodyFactory.CreateRectangle(mWorld, mWidth, mHeight,1f, mPosition);
            //mBody.LinearDamping = f;
            //mBody.Restitution = 1f;

            if (playerIndex == PlayerIndex.One)
                mBody.BodyType = BodyType.Dynamic;
            else
                mBody.BodyType = BodyType.Dynamic;

            mBody.OnCollision += new OnCollisionEventHandler(OnCollision);
            mBody.OnSeparation += new OnSeparationEventHandler(OnSeparation);
            mWorld.ContactManager.OnBroadphaseCollision += OnBroadphaseCollision;
            mBody.FixtureList[0].AfterCollision += new AfterCollisionEventHandler(OnAfterCollision);

            //FixedPrismaticJoint fixedPrismJoint = new FixedPrismaticJoint(mBody, mBody.Position, new Vector2(0, 1f));
            //fixedPrismJoint.LimitEnabled = true;
            //fixedPrismJoint.LowerLimit = -3f;
            //fixedPrismJoint.UpperLimit = 3f;
            //fixedPrismJoint.Enabled = true;
            //mWorld.AddJoint(fixedPrismJoint);

            particleRenderer.LoadContent(mContentManager);
            particleEffect = mContentManager.Load<ParticleEffect>(@"Content\basicExplosion");
            particleEffect.LoadContent(mContentManager);
            particleEffect.Initialise();

            base.LoadContent();
        }
예제 #22
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // load particle effects
            myEffect = Content.Load<ParticleEffect>(@"EffectLibrary\CampFire");
            myEffect.LoadContent(this.Content);
            myEffect.Initialise();
            myRenderer.LoadContent(Content);

            shipCannon = new GameObject(Content.Load<Texture2D>("Sprites\\shipCannon"));

            HUD = Content.Load<SpriteFont>("Fonts\\HUD");

            meteorTexture = Content.Load<Texture2D>("Sprites\\meteoro_teste");
            //meteorTexture = Content.Load<Texture2D>("Sprites\\1");

            Debug = Content.Load<SpriteFont>("Fonts\\Score");

            Fundo = Content.Load<Texture2D>("Sprites\\background");

            shipCannon2 = new GameObject(Content.Load<Texture2D>("Sprites\\shipCannon"));

            elementoBen = new elementoBenefico(Content.Load<Texture2D>("Sprites\\insgrocha"), Content.Load<Texture2D>("Sprites\\insignacoracao"));

            shipCannon2.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 + 110,
               Window.ClientBounds.Height - 100);

            shipCannon.position = new Vector2(Window.ClientBounds.Width / 2 - shipCannon.sprite.Width / 2 - 80,
                Window.ClientBounds.Height - 100);

            meteorTextureDB =
               new Color[meteorTexture.Width * meteorTexture.Height];
            meteorTexture.GetData(meteorTextureDB);
        }
예제 #23
0
        public override void Load(LoadManager content)
        {
            base.Load(content);

            mParticleEffect = MilkShake.ConentManager.Load<ParticleEffect>(mAssetURL).DeepCopy(); // Deep Copy to stop referances
            mParticleEffect.Initialise();

            foreach (Emitter emitter in mParticleEffect)
            {
                // Fix

                String fileName = mAssetURL.Split('/')[mAssetURL.Split('/').Length - 1];
                String folderURL = mAssetURL.Replace(fileName, "");

                emitter.ParticleTexture = MilkShake.ConentManager.Load<Texture2D>(folderURL + emitter.ParticleTextureAssetName);
                if (!emitter.Initialised) emitter.Initialise();
                //EmitterBlendMode.
            }
        }