예제 #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;
        }
예제 #2
0
        public virtual void Load()
        {
            walkingAnimation = Scripts.LoadEntityWalkAnimation(walkSpriteSheet);

            foreach (KeyValuePair <Direction, Animation> kvp in walkingAnimation)
            {
                kvp.Value.ChangeAnimatingState(false);
                kvp.Value.stepsPerFrame = 15 - (int)moveSpeed;
            }
        }
예제 #3
0
파일: Player.cs 프로젝트: rokn/AbilityGame
        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());
        }