public WndHero() { icons = TextureCache.Get(Assets.BUFFS_LARGE); film = new TextureFilm(icons, 16, 16); stats = new StatsTab(this); Add(stats); buffs = new BuffsTab(this); Add(buffs); var statsTab = new LabeledTab(this, TXT_STATS); statsTab.SelectAction = StatsSelect; Add(statsTab); var buffsTab = new LabeledTab(this, TXT_BUFFS); buffsTab.SelectAction = BuffsSelect; Add(buffsTab); foreach (var tab in Tabs) { tab.SetSize(TAB_WIDTH, TabHeight()); } Resize(WIDTH, (int)Math.Max(stats.Height(), buffs.Height())); Select(0); }
public SpellSprite() : base(Assets.SPELL_ICONS) { if (_film == null) { _film = new TextureFilm(texture, Size); } }
public ItemSprite(int image, Glowing glowing) : base(Assets.ITEMS) { if (film == null) { film = new TextureFilm(texture, SIZE, SIZE); } View(image, glowing); }
public Speck() { Texture(Assets.SPECKS); if (_film == null) { _film = new TextureFilm(texture, Size, Size); } Origin.Set(Size / 2f); }
public static Image Image(int index) { var image = new Image(Assets.BADGES); if (_atlas == null) { _atlas = new TextureFilm(image.texture, 16, 16); } image.Frame(_atlas.Get(index)); return(image); }
public PlantSprite() : base(Assets.PLANTS) { if (_frames == null) { // Hardcoded size _frames = new TextureFilm(texture, 16, 16); } // Hardcoded origin Origin.Set(8, 12); }
public ShopkeeperSprite() { Texture(Assets.KEEPER); var film = new TextureFilm(texture, 14, 14); IdleAnimation = new Animation(10, true); IdleAnimation.Frames(film, 1, 1, 1, 1, 1, 0, 0, 0, 0); RunAnimation = IdleAnimation.Clone(); DieAnimation = IdleAnimation.Clone(); AttackAnimation = IdleAnimation.Clone(); Idle(); }
public static TextureFilm Tiers() { if (_tiers != null) { return(_tiers); } // Sprites for All classes are the same in size var texture = TextureCache.Get(Assets.ROGUE); _tiers = new TextureFilm(texture, texture.Width, FrameHeight); return(_tiers); }
public GhostSprite() { Texture(Assets.GHOST); TextureFilm frames = new TextureFilm(texture, 14, 15); IdleAnimation = new Animation(5, true); IdleAnimation.Frames(frames, 0, 1); RunAnimation = new Animation(10, true); RunAnimation.Frames(frames, 0, 1); DieAnimation = new Animation(20, false); DieAnimation.Frames(frames, 0); Play(IdleAnimation); }
public WandmakerSprite() { Texture(Assets.MAKER); var frames = new TextureFilm(texture, 12, 14); IdleAnimation = new Animation(10, true); IdleAnimation.Frames(frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 3, 2, 1); RunAnimation = new Animation(20, true); RunAnimation.Frames(frames, 0); DieAnimation = new Animation(20, false); DieAnimation.Frames(frames, 0); Play(IdleAnimation); }
public Pet() : base(Assets.PET) { var frames = new TextureFilm(texture, 16, 16); _idle = new Animation(2, true); _idle.Frames(frames, 0, 0, 0, 0, 0, 0, 1); _jump = new Animation(10, false); _jump.Frames(frames, 2, 3, 4, 5, 6); Listener = this; Play(_idle); }
public BlacksmithSprite() { Texture(Assets.TROLL); var frames = new TextureFilm(texture, 13, 16); IdleAnimation = new Animation(15, true); IdleAnimation.Frames(frames, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3); RunAnimation = new Animation(20, true); RunAnimation.Frames(frames, 0); DieAnimation = new Animation(20, false); DieAnimation.Frames(frames, 0); Play(IdleAnimation); }
public ImpSprite() { Texture(Assets.IMP); var frames = new TextureFilm(texture, 12, 14); IdleAnimation = new Animation(10, true); IdleAnimation.Frames(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); RunAnimation = new Animation(20, true); RunAnimation.Frames(frames, 0); DieAnimation = new Animation(10, false); DieAnimation.Frames(frames, 0, 3, 2, 1, 0, 3, 2, 1, 0); Play(IdleAnimation); }
public SheepSprite() { Texture(Assets.SHEEP); var frames = new TextureFilm(texture, 16, 15); IdleAnimation = new Animation(8, true); IdleAnimation.Frames(frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0); RunAnimation = IdleAnimation.Clone(); AttackAnimation = IdleAnimation.Clone(); DieAnimation = new Animation(20, false); DieAnimation.Frames(frames, 0); Play(IdleAnimation); curFrame = pdsharp.utils.Random.Int(curAnim.frames.Length); }
public virtual void UpdateArmor(int tier) { var film = new TextureFilm(HeroSprite.Tiers(), tier, FrameWidth, FrameHeight); IdleAnimation = new Animation(1, true); IdleAnimation.Frames(film, 0, 0, 0, 1, 0, 0, 1, 1); RunAnimation = new Animation(20, true); RunAnimation.Frames(film, 2, 3, 4, 5, 6, 7); DieAnimation = new Animation(20, false); DieAnimation.Frames(film, 0); AttackAnimation = new Animation(15, false); AttackAnimation.Frames(film, 13, 14, 15, 0); Idle(); }
public ShieldedSprite() { Texture(Assets.BRUTE); var frames = new TextureFilm(texture, 12, 16); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 21, 21, 21, 22, 21, 21, 22, 22); RunAnimation = new Animation(12, true); RunAnimation.Frames(frames, 25, 26, 27, 28); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(frames, 23, 24); DieAnimation = new Animation(12, false); DieAnimation.Frames(frames, 29, 30, 31); Play(IdleAnimation); }
public GnollSprite() { Texture(Assets.GNOLL); var frames = new TextureFilm(texture, 12, 15); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 0, 0, 0, 1, 0, 0, 1, 1); RunAnimation = new Animation(12, true); RunAnimation.Frames(frames, 4, 5, 6, 7); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(frames, 2, 3, 0); DieAnimation = new Animation(12, false); DieAnimation.Frames(frames, 8, 9, 10); Play(IdleAnimation); }
public AlbinoSprite() { Texture(Assets.RAT); var frames = new TextureFilm(texture, 16, 15); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 16, 16, 16, 17); RunAnimation = new Animation(10, true); RunAnimation.Frames(frames, 22, 23, 24, 25, 26); AttackAnimation = new Animation(15, false); AttackAnimation.Frames(frames, 18, 19, 20, 21); DieAnimation = new Animation(10, false); DieAnimation.Frames(frames, 27, 28, 29, 30); Play(IdleAnimation); }
public BanditSprite() { Texture(Assets.THIEF); var film = new TextureFilm(texture, 12, 13); IdleAnimation = new Animation(1, true); IdleAnimation.Frames(film, 21, 21, 21, 22, 21, 21, 21, 21, 22); RunAnimation = new Animation(15, true); RunAnimation.Frames(film, 21, 21, 23, 24, 24, 25); DieAnimation = new Animation(10, false); DieAnimation.Frames(film, 25, 27, 28, 29, 30); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(film, 31, 32, 33); Idle(); }
public KingSprite() { Texture(Assets.KING); var frames = new TextureFilm(texture, 16, 16); IdleAnimation = new Animation(12, true); IdleAnimation.Frames(frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2); RunAnimation = new Animation(15, true); RunAnimation.Frames(frames, 3, 4, 5, 6, 7, 8); AttackAnimation = new Animation(15, false); AttackAnimation.Frames(frames, 9, 10, 11); DieAnimation = new Animation(8, false); DieAnimation.Frames(frames, 12, 13, 14, 15); Play(IdleAnimation); }
public BatSprite() { Texture(Assets.BAT); TextureFilm frames = new TextureFilm(texture, 15, 15); IdleAnimation = new Animation(8, true); IdleAnimation.Frames(frames, 0, 1); RunAnimation = new Animation(12, true); RunAnimation.Frames(frames, 0, 1); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(frames, 2, 3, 0, 1); DieAnimation = new Animation(12, false); DieAnimation.Frames(frames, 4, 5, 6); Play(IdleAnimation); }
public StatueSprite() { Texture(Assets.STATUE); var frames = new TextureFilm(texture, 12, 15); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 0, 0, 0, 0, 0, 1, 1); RunAnimation = new Animation(15, true); RunAnimation.Frames(frames, 2, 3, 4, 5, 6, 7); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(frames, 8, 9, 10); DieAnimation = new Animation(5, false); DieAnimation.Frames(frames, 11, 12, 13, 14, 15, 15); Play(IdleAnimation); }
public RottingFistSprite() { Texture(Assets.ROTTING); var frames = new TextureFilm(texture, 24, 17); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 0, 0, 1); RunAnimation = new Animation(3, true); RunAnimation.Frames(frames, 0, 1); AttackAnimation = new Animation(2, false); AttackAnimation.Frames(frames, 0); DieAnimation = new Animation(10, false); DieAnimation.Frames(frames, 0, 2, 3, 4); Play(IdleAnimation); }
public ThiefSprite() { Texture(Assets.THIEF); var film = new TextureFilm(texture, 12, 13); IdleAnimation = new Animation(1, true); IdleAnimation.Frames(film, 0, 0, 0, 1, 0, 0, 0, 0, 1); RunAnimation = new Animation(15, true); RunAnimation.Frames(film, 0, 0, 2, 3, 3, 4); DieAnimation = new Animation(10, false); DieAnimation.Frames(film, 5, 6, 7, 8, 9); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(film, 10, 11, 12, 0); Idle(); }
public EyeSprite() { Texture(Assets.EYE); var frames = new TextureFilm(texture, 16, 18); IdleAnimation = new Animation(8, true); IdleAnimation.Frames(frames, 0, 1, 2); RunAnimation = new Animation(12, true); RunAnimation.Frames(frames, 5, 6); AttackAnimation = new Animation(8, false); AttackAnimation.Frames(frames, 4, 3); DieAnimation = new Animation(8, false); DieAnimation.Frames(frames, 7, 8, 9); Play(IdleAnimation); }
public YogSprite() { Texture(Assets.YOG); var frames = new TextureFilm(texture, 20, 19); IdleAnimation = new Animation(10, true); IdleAnimation.Frames(frames, 0, 1, 2, 2, 1, 0, 3, 4, 4, 3, 0, 5, 6, 6, 5); RunAnimation = new Animation(12, true); RunAnimation.Frames(frames, 0); AttackAnimation = new Animation(12, false); AttackAnimation.Frames(frames, 0); DieAnimation = new Animation(10, false); DieAnimation.Frames(frames, 0, 7, 8, 9); Play(IdleAnimation); }
public DM300Sprite() { Texture(Assets.DM300); var frames = new TextureFilm(texture, 22, 20); IdleAnimation = new Animation(10, true); IdleAnimation.Frames(frames, 0, 1); RunAnimation = new Animation(10, true); RunAnimation.Frames(frames, 2, 3); AttackAnimation = new Animation(15, false); AttackAnimation.Frames(frames, 4, 5, 6); DieAnimation = new Animation(20, false); DieAnimation.Frames(frames, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7, 8); Play(IdleAnimation); }
public WraithSprite() { Texture(Assets.WRAITH); var frames = new TextureFilm(texture, 14, 15); IdleAnimation = new Animation(5, true); IdleAnimation.Frames(frames, 0, 1); RunAnimation = new Animation(10, true); RunAnimation.Frames(frames, 0, 1); AttackAnimation = new Animation(10, false); AttackAnimation.Frames(frames, 0, 2, 3); DieAnimation = new Animation(8, false); DieAnimation.Frames(frames, 0, 4, 5, 6, 7); Play(IdleAnimation); }
public RatSprite() { Texture(Assets.RAT); var frames = new TextureFilm(texture, 16, 15); IdleAnimation = new Animation(2, true); IdleAnimation.Frames(frames, 0, 0, 0, 1); RunAnimation = new Animation(10, true); RunAnimation.Frames(frames, 6, 7, 8, 9, 10); AttackAnimation = new Animation(15, false); AttackAnimation.Frames(frames, 2, 3, 4, 5, 0); DieAnimation = new Animation(10, false); DieAnimation.Frames(frames, 11, 12, 13, 14); Play(IdleAnimation); }
public PiranhaSprite() { Texture(Assets.PIRANHA); var frames = new TextureFilm(texture, 12, 16); IdleAnimation = new Animation(8, true); IdleAnimation.Frames(frames, 0, 1, 2, 1); RunAnimation = new Animation(20, true); RunAnimation.Frames(frames, 0, 1, 2, 1); AttackAnimation = new Animation(20, false); AttackAnimation.Frames(frames, 3, 4, 5, 6, 7, 8, 9, 10, 11); DieAnimation = new Animation(4, false); DieAnimation.Frames(frames, 12, 13, 14); Play(IdleAnimation); }