Пример #1
0
        public IconData(Type type, int id)
        {
            this.type = type;
            this.id   = id;

            switch (type)
            {
            case Type.Item:
                uniqueKey = ItemID.GetUniqueKey(id);
                animation = Main.itemAnimations[id] as DrawAnimationVertical ?? new DrawAnimationVertical(0, 1);
                break;

            case Type.NPC:
                uniqueKey = NPCID.GetUniqueKey(id);
                animation = new DrawAnimationVertical(5, Main.npcFrameCount[id]);
                break;

            case Type.Projectile:
                uniqueKey = ProjectileID.GetUniqueKey(id);
                animation = new DrawAnimationVertical(5, Main.projFrames[id]);
                break;
            }
        }
Пример #2
0
 public ProjectileDefinition(int type) : base(ProjectileID.GetUniqueKey(type))
 {
 }