Beispiel #1
0
        public override void Load()
        {
            base.Load();
            phoenixSpriteSheet = Scripts.LoadTexture(@"Abilities\FireControl\Phoenix");
            phoenixAnimation   = Scripts.LoadEntityWalkAnimation(phoenixSpriteSheet);

            PhoenixWidth         = phoenixSpriteSheet.Width / 4;
            PhoenixHeight        = phoenixSpriteSheet.Height / 4;
            phoenixWalkingOrigin = Scripts.GetWalkingOrigin(PhoenixWidth, PhoenixHeight);
            phoenixWalkingRect   = Scripts.GetWalkingRect(new Vector2(), PhoenixWidth, PhoenixHeight);

            particles = new List <Texture2D>()
            {
                Scripts.LoadTexture(@"Abilities\Circle")
            };
            particleSystem = new ParticleEngine(particles, Owner.Position);

            foreach (KeyValuePair <Direction, Animation> kvp in Owner.walkingAnimation)
            {
                ownerAnimation.Add(kvp.Key, kvp.Value);
            }
            DefaultEntityWidth  = Owner.EntityWidth;
            DefaultEntityHeight = Owner.EntityHeight;
            ownerWalkingOrigin  = Owner.WalkingOrigin;
            ownerWalkingRect    = Owner.WalkingRect;
        }
Beispiel #2
0
        public override void Load()
        {
            walkSpriteSheet = Scripts.LoadTexture(@"Enemies\Enemy_" + id.ToString());

            EntityWidth  = walkSpriteSheet.Width / 4;
            EntityHeight = walkSpriteSheet.Height / 4;

            this.Initialize();

            healthBar.Load(true, "Enemies");

            base.Load();
        }
Beispiel #3
0
        public override void Load()
        {
            weaponTexture = Scripts.LoadTexture(@"Weapons\Sword");

            walkSpriteSheet = Scripts.LoadTexture(@"Player\Walk");

            flySpritesheet = Scripts.LoadTexture(@"Player\Fly");

            flyingAnimation = Scripts.LoadEntityWalkAnimation(flySpritesheet);

            foreach (KeyValuePair <Direction, Animation> kvp in flyingAnimation)
            {
                kvp.Value.ChangeAnimatingState(false);
                kvp.Value.stepsPerFrame = 10 - (int)moveSpeed;
            }

            base.Load();

            abilities.ForEach(ab => ab.Load());
        }
Beispiel #4
0
        public void Load(bool HasBackground, string Folder)
        {
            this.hasBackground = HasBackground;
            if (HasBackground)
            {
                texture           = Scripts.LoadTexture(Folder + @"\HealthBar");
                backGroundTexture = Scripts.LoadTexture(Folder + @"\HealthBarBackground");
            }
            else if (!HasBackground)
            {
                texture = Scripts.LoadTexture(Folder + @"\HealthBar");
            }

            Origin = new Vector2(maxWidth / 2, texture.Height / 2);

            if (HasBackground)
            {
                backgroundPosition = Position + Origin;
                backOrigin         = new Vector2(backGroundTexture.Width / 2, backGroundTexture.Height / 2);
            }

            source = new Rectangle(0, 0, maxWidth, texture.Height);
        }
Beispiel #5
0
        protected override void LoadContent()
        {
            spriteBatch  = new SpriteBatch(GraphicsDevice);
            mouseTexture = Scripts.LoadTexture("Mouse");
            BoundingBox  = Scripts.LoadTexture("WhitePixel");
            Font         = Content.Load <SpriteFont>("Font");

            for (int i = 0; i < TileSetsCount; i++)
            {
                TileSet.SpriteSheet.Add(Scripts.LoadTexture(@"TileSets\Tileset_ (" + i.ToString() + ")"));
            }

            if (!inEditMode)
            {
                Projectiles.ForEach(LoadObject);
                Entities.ForEach(LoadObject);
            }
            else
            {
                EditorGUI.Initialize();
                EditorGUI.Load();
            }
        }
Beispiel #6
0
 public static void Load()
 {
     pixelBox            = Scripts.LoadTexture("WhitePixel");
     selectedTileTexture = Scripts.LoadTexture(@"TileSets\TileMarker");
 }
Beispiel #7
0
 public void Load()
 {
     texture = Scripts.LoadTexture(@"Projectiles\Proj_2");
 }
Beispiel #8
0
 public override void Load()
 {
     pushTexture       = Scripts.LoadTexture(@"Abilities\Telekinesis\Push");
     pullTexture       = Scripts.LoadTexture(@"Abilities\Telekinesis\Pull");
     pullTextureOrigin = new Vector2(pullTexture.Width / 2, pullTexture.Height / 2);
 }