Beispiel #1
0
        public static Bow Create(ResourceCachedLoader loader)
        {
            var @static     = loader.GetAnimation("./animations/bow_static");
            var moving      = loader.GetAnimation("./animations/bow_moving");
            var shoot       = loader.GetAnimation("./animations/bow_shoot");
            var arrowSprite = loader.GetSprite("./sprites/arrow.png");
            var shootSound  = loader.GetSound(MusicResourceHelper.BowShootSoundPath);

            return(new Bow(
                       @static,
                       moving,
                       shoot,
                       arrowSprite,
                       shootSound));
        }
Beispiel #2
0
        public static Sword Create(ResourceCachedLoader loader)
        {
            var @static     = loader.GetAnimation("./animations/sword_static");
            var leftAttack  = loader.GetAnimation("./animations/sword_left_attack");
            var rightAttack = loader.GetAnimation("./animations/sword_right_attack");
            var leftBlock   = loader.GetAnimation("./animations/sword_left_block");
            var rightBlock  = loader.GetAnimation("./animations/sword_right_block");

            return(new Sword(
                       @static,
                       leftAttack,
                       rightAttack,
                       leftBlock,
                       rightBlock,
                       @static));
        }
Beispiel #3
0
        public static Skeleton Create(ResourceCachedLoader loader, Vector2 position, float directionAngle)
        {
            var staticAnimation = loader.GetAnimation("./animations/skeleton/guard_right");
            var followingAndBlockingAnimation = loader.GetAnimation("./animations/skeleton/moving");
            var attackRightAnimation          = loader.GetAnimation("./animations/skeleton/right_attack");
            var attackLeftAnimation           = loader.GetAnimation("./animations/skeleton/left_attack");
            var blockRightAnimation           = loader.GetAnimation("./animations/skeleton/guard_right");
            var blockLeftAnimation            = loader.GetAnimation("./animations/skeleton/guard_left");
            var size       = new Vector2(0.3f, 0.3f);
            var dead       = loader.GetAnimation("./animations/skeleton/dead");
            var deathSound = loader.GetSound(MusicResourceHelper.SkeletonDeadPath);
            var hitSound   = loader.GetSound(MusicResourceHelper.SkeletonHit);
            var shieldHit  = loader.GetSound(MusicResourceHelper.SkeletonShieldHit);

            return(new Skeleton(
                       staticAnimation,
                       followingAndBlockingAnimation,
                       attackRightAnimation,
                       attackLeftAnimation,
                       blockRightAnimation,
                       blockLeftAnimation,
                       position,
                       size,
                       directionAngle,
                       dead,
                       deathSound,
                       hitSound,
                       shieldHit));
        }
Beispiel #4
0
        public static Lich Create(ResourceCachedLoader loader, Vector2 position, float direction)
        {
            var staticAnimation   = loader.GetAnimation("./animations/lich/static");
            var deadAnimation     = loader.GetAnimation("./animations/lich/dead");
            var shootingAnimation = loader.GetAnimation("./animations/lich/shooting");
            var runningAnimation  = loader.GetAnimation("./animations/lich/running");
            var fireBallAnimation = loader.GetAnimation("./animations/fireball/moving");
            var fireBallBlowing   = loader.GetAnimation("./animations/fireball/blow");
            var fireBallBlowSound = loader.GetSound(MusicResourceHelper.FireBallBlowPath);
            var laugh             = loader.GetSound(MusicResourceHelper.LichEvilLaughPath);
            var deathSound        = loader.GetSound(MusicResourceHelper.LichDeadPath);
            var size = new Vector2(0.3f, 0.3f);

            return(new Lich(
                       position, size, direction,
                       staticAnimation,
                       deadAnimation,
                       shootingAnimation,
                       runningAnimation,
                       fireBallAnimation,
                       fireBallBlowing,
                       fireBallBlowSound,
                       laugh,
                       deathSound));
        }
Beispiel #5
0
        public static Rat Create(ResourceCachedLoader loader, Vector2 position, float directionAngle)
        {
            var staticAnimation         = loader.GetAnimation("./animations/rat/static");
            var playerFollowerAnimation = loader.GetAnimation("./animations/rat/moving");
            var attackAnimation         = loader.GetAnimation("./animations/rat/attack");
            var deathSound    = loader.GetSound(MusicResourceHelper.RatDeathSoundPath);
            var deadAnimation = loader.GetAnimation("./animations/rat/dead");
            var attackSound   = loader.GetSound(MusicResourceHelper.RatAttackPath);
            var hitSound      = loader.GetSound(MusicResourceHelper.RatHitPath);
            var size          = new Vector2(0.3f, 0.3f);

            return(new Rat(
                       staticAnimation,
                       playerFollowerAnimation,
                       attackAnimation,
                       position,
                       size,
                       directionAngle,
                       deathSound,
                       deadAnimation,
                       attackSound,
                       hitSound));
        }