コード例 #1
0
        public ItemSprite(ContentManager content, ItemSpriteSheet itemType)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.items);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 16);

            this.Sprite = frames[(int)itemType];
        }
コード例 #2
0
ファイル: ShopkeeperSprite.cs プロジェクト: ApmeM/PixelRPG
        public ShopkeeperSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Neutral.shopkeeper);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 14, 14);

            this.Idle = new SpriteAnimation(frames, 1, 1, 1, 1, 1, 0, 0, 0, 0);

            this.Die    = new SpriteAnimation(frames, 0);
            this.Run    = new SpriteAnimation(frames, 0);
            this.Attack = new SpriteAnimation(frames, 0);
        }
コード例 #3
0
        public BlacksmithSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Neutral.blacksmith);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 13, 16);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3);

            this.Run = new SpriteAnimation(frames, 0);

            this.Attack = new SpriteAnimation(frames, 0);

            this.Die = new SpriteAnimation(frames, 0);
        }
コード例 #4
0
        public BurningFistSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.burning_fist);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 24, 17);

            this.Idle = new SpriteAnimation(frames, 0, 0, 1);

            this.Run = new SpriteAnimation(frames, 0, 1);

            this.Attack = new SpriteAnimation(frames, 0, 5, 6);

            this.Die = new SpriteAnimation(frames, 0, 2, 3, 4);
        }
コード例 #5
0
        public ThiefSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.thief);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 13);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1, 0, 0, 0, 0, 1);

            this.Run = new SpriteAnimation(frames, 0, 0, 2, 3, 3, 4);

            this.Die = new SpriteAnimation(frames, 5, 6, 7, 8, 9);

            this.Attack = new SpriteAnimation(frames, 10, 11, 12, 0);
        }
コード例 #6
0
ファイル: DM300Sprite.cs プロジェクト: ApmeM/PixelRPG
        public DM300Sprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.dm300);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 22, 20);

            this.Idle = new SpriteAnimation(frames, 0, 1);

            this.Run = new SpriteAnimation(frames, 2, 3);

            this.Attack = new SpriteAnimation(frames, 4, 5, 6);

            this.Die = new SpriteAnimation(frames, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 8);
        }
コード例 #7
0
ファイル: GooSprite.cs プロジェクト: ApmeM/PixelRPG
        public GooSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.goo);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 20, 14);

            this.Idle = new SpriteAnimation(frames, 0, 1);

            this.Run = new SpriteAnimation(frames, 0, 1);

            this.Attack = new SpriteAnimation(frames, 5, 0, 6);

            this.Die = new SpriteAnimation(frames, 2, 3, 4);
        }
コード例 #8
0
ファイル: ElementalSprite.cs プロジェクト: ApmeM/PixelRPG
        public ElementalSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.elemental);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 14);

            this.Idle = new SpriteAnimation(frames, 0, 1, 2);

            this.Run = new SpriteAnimation(frames, 0, 1, 3);

            this.Attack = new SpriteAnimation(frames, 4, 5, 6);

            this.Die = new SpriteAnimation(frames, 7, 8, 9, 10, 11, 12, 13, 12);
        }
コード例 #9
0
ファイル: MonkSprite.cs プロジェクト: ApmeM/PixelRPG
        public MonkSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.monk);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 15, 14);

            this.Idle = new SpriteAnimation(frames, 1, 0, 1, 2);

            this.Run = new SpriteAnimation(frames, 11, 12, 13, 14, 15, 16);

            this.Attack = new SpriteAnimation(frames, 3, 4, 3, 4, 5, 6, 5);

            this.Die = new SpriteAnimation(frames, 1, 7, 8, 8, 9, 10);
        }
コード例 #10
0
        public GolemSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.golem);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 16);

            this.Idle = new SpriteAnimation(frames, 0, 1);

            this.Run = new SpriteAnimation(frames, 2, 3, 4, 5);

            this.Attack = new SpriteAnimation(frames, 6, 7, 8);

            this.Die = new SpriteAnimation(frames, 9, 10, 11, 12, 13);
        }
コード例 #11
0
ファイル: GnollSprite.cs プロジェクト: ApmeM/PixelRPG
        public GnollSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.gnoll);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 15);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1, 0, 0, 1, 1);

            this.Run = new SpriteAnimation(frames, 4, 5, 6, 7);

            this.Attack = new SpriteAnimation(frames, 2, 3, 0);

            this.Die = new SpriteAnimation(frames, 8, 9, 10);
        }
コード例 #12
0
        public YogSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.yog);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 20, 19);

            this.Idle = new SpriteAnimation(frames, 0, 1, 2, 2, 1, 0, 3, 4, 4, 3, 0, 5, 6, 6, 5);

            this.Run = new SpriteAnimation(frames, 0);

            this.Attack = new SpriteAnimation(frames, 0);

            this.Die = new SpriteAnimation(frames, 0, 7, 8, 9);
        }
コード例 #13
0
        public CrabSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.crab);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 16);

            this.Idle = new SpriteAnimation(frames, 0, 1, 0, 2);

            this.Run = new SpriteAnimation(frames, 3, 4, 5, 6);

            this.Attack = new SpriteAnimation(frames, 7, 8, 9);

            this.Die = new SpriteAnimation(frames, 10, 11, 12, 13);
        }
コード例 #14
0
ファイル: TenguSprite.cs プロジェクト: ApmeM/PixelRPG
        public TenguSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.tengu);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 14, 16);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1);

            this.Run = new SpriteAnimation(frames, 2, 3, 4, 5, 0);

            this.Attack = new SpriteAnimation(frames, 6, 7, 7, 0);

            this.Die = new SpriteAnimation(frames, 8, 9, 10, 10, 10, 10, 10, 10);
        }
コード例 #15
0
ファイル: AlbinoSprite.cs プロジェクト: ApmeM/PixelRPG
        public AlbinoSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.rat);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 15);

            this.Idle = new SpriteAnimation(frames, 16, 16, 16, 17);

            this.Run = new SpriteAnimation(frames, 22, 23, 24, 25, 26);

            this.Attack = new SpriteAnimation(frames, 18, 19, 20, 21);

            this.Die = new SpriteAnimation(frames, 27, 28, 29, 30);
        }
コード例 #16
0
ファイル: SkeletonSprite.cs プロジェクト: ApmeM/PixelRPG
        public SkeletonSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.skeleton);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 15);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3);

            this.Run = new SpriteAnimation(frames, 4, 5, 6, 7, 8, 9);

            this.Attack = new SpriteAnimation(frames, 14, 15, 16);

            this.Die = new SpriteAnimation(frames, 10, 11, 12, 13);
        }
コード例 #17
0
        public WarlockSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.warlock);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 15);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1, 0, 0, 1, 1);

            this.Run = new SpriteAnimation(frames, 0, 2, 3, 4);

            this.Attack = new SpriteAnimation(frames, 0, 5, 6);

            this.Die = new SpriteAnimation(frames, 0, 7, 8, 8, 9, 10);
        }
コード例 #18
0
ファイル: WraithSprite.cs プロジェクト: ApmeM/PixelRPG
        public WraithSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.wraith);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 14, 15);

            this.Idle = new SpriteAnimation(frames, 0, 1);

            this.Run = new SpriteAnimation(frames, 0, 1);

            this.Attack = new SpriteAnimation(frames, 0, 2, 3);

            this.Die = new SpriteAnimation(frames, 0, 4, 5, 6, 7);
        }
コード例 #19
0
        public ShieldedSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.brute);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 16);

            this.Idle = new SpriteAnimation(frames, 21, 21, 21, 22, 21, 21, 22, 22);

            this.Run = new SpriteAnimation(frames, 25, 26, 27, 28);

            this.Attack = new SpriteAnimation(frames, 23, 24);

            this.Die = new SpriteAnimation(frames, 29, 30, 31);
        }
コード例 #20
0
        public EyeSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.eye);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 18);

            this.Idle = new SpriteAnimation(frames, 0, 1, 2);

            this.Run = new SpriteAnimation(frames, 5, 6);

            this.Attack = new SpriteAnimation(frames, 4, 3);

            this.Die = new SpriteAnimation(frames, 7, 8, 9);
        }
コード例 #21
0
ファイル: AcidicSprite.cs プロジェクト: ApmeM/PixelRPG
        public AcidicSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.scorpio);
            var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 18, 17);

            this.Idle = new SpriteAnimation(frames, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 16, 15, 16);

            this.Run = new SpriteAnimation(frames, 19, 20);

            this.Attack = new SpriteAnimation(frames, 14, 17, 18);

            this.Die = new SpriteAnimation(frames, 14, 21, 22, 23, 24);
        }
コード例 #22
0
    public BanditSprite(ContentManager content)
    {
        var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.thief);
        var frames  = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 13);

        this.Idle = new SpriteAnimation(frames, 21, 21, 21, 22, 21, 21, 21, 21, 2);

        this.Run = new SpriteAnimation(frames, 21, 21, 23, 24, 24, 25);

        this.Attack = new SpriteAnimation(frames, 31, 32, 33);

        this.Die = new SpriteAnimation(frames, 25, 27, 28, 29, 30);
    }
コード例 #23
0
        public RatKingSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.ratking);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 16);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1);

            this.Run = new SpriteAnimation(frames, 2, 3, 4, 5, 6);

            this.Attack = new SpriteAnimation(frames, 0);

            this.Die = new SpriteAnimation(frames, 0);
        }
コード例 #24
0
ファイル: SuccubusSprite.cs プロジェクト: ApmeM/PixelRPG
        public SuccubusSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.succubus);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 15);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 1);

            this.Run = new SpriteAnimation(frames, 3, 4, 5, 6, 7, 8);

            this.Attack = new SpriteAnimation(frames, 9, 10, 11);

            this.Die = new SpriteAnimation(frames, 12);
        }
コード例 #25
0
ファイル: LarvaSprite.cs プロジェクト: ApmeM/PixelRPG
        public LarvaSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.larva);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 8);

            this.Idle = new SpriteAnimation(frames, 4, 4, 4, 4, 4, 5, 5);

            this.Run = new SpriteAnimation(frames, 0, 1, 2, 3);

            this.Attack = new SpriteAnimation(frames, 6, 5, 7);

            this.Die = new SpriteAnimation(frames, 8);
        }
コード例 #26
0
ファイル: SeniorSprite.cs プロジェクト: ApmeM/PixelRPG
        public SeniorSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.monk);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 15, 14);

            this.Idle = new SpriteAnimation(frames, 18, 17, 18, 19);

            this.Run = new SpriteAnimation(frames, 28, 29, 30, 31, 32, 33);

            this.Attack = new SpriteAnimation(frames, 20, 21, 20, 21, 22, 23, 22);

            this.Die = new SpriteAnimation(frames, 18, 24, 25, 25, 26, 27);
        }
コード例 #27
0
ファイル: PiranhaSprite.cs プロジェクト: ApmeM/PixelRPG
        public PiranhaSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.piranha);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 16);

            this.Idle = new SpriteAnimation(frames, 0, 1, 2, 1);

            this.Run = new SpriteAnimation(frames, 0, 1, 2, 1);

            this.Attack = new SpriteAnimation(frames, 3, 4, 5, 6, 7, 8, 9, 10, 11);

            this.Die = new SpriteAnimation(frames, 12, 13, 14);
        }
コード例 #28
0
        public ScorpioSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.scorpio);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 18, 17);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2);

            this.Run = new SpriteAnimation(frames, 5, 5, 6, 6);

            this.Attack = new SpriteAnimation(frames, 0, 3, 4);

            this.Die = new SpriteAnimation(frames, 0, 7, 8, 9, 10);
        }
コード例 #29
0
        public MimicSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Enemy.mimic);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 16, 16);

            this.Idle = new SpriteAnimation(frames, 0, 0, 0, 1, 1);

            this.Run = new SpriteAnimation(frames, 0, 1, 2, 3, 3, 2, 1);

            this.Attack = new SpriteAnimation(frames, 0, 4, 5, 6);

            this.Die = new SpriteAnimation(frames, 7, 8, 9);
        }
コード例 #30
0
ファイル: ImpSprite.cs プロジェクト: ApmeM/PixelRPG
        public ImpSprite(ContentManager content)
        {
            var texture = content.Load <Texture2D>(ContentPaths.Assets.Neutral.demon);

            var frames = SubtextureDrawable.SubtexturesFromAtlas(texture, 12, 14);

            this.Idle = new SpriteAnimation(frames,
                                            0, 1, 2, 3, 0, 1, 2, 3, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
                                            0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 3, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4);

            this.Run = new SpriteAnimation(frames, 0);

            this.Attack = new SpriteAnimation(frames, 0);

            this.Die = new SpriteAnimation(frames, 0, 3, 2, 1, 0, 3, 2, 1, 0);
        }