AngeliA
Search Results for

    Show / Hide Table of Contents

    Class Sheet

    Artwork sheet that holds sprites, sprite groups, atlas and textures data for rendering

    Constructors

    Sheet(bool, bool, bool)

    Artwork sheet that holds sprites, sprite groups, atlas and textures data for rendering

    Declaration
    public Sheet(bool ignoreGroups = false, bool ignoreSpriteWithPaletteTag = true, bool ignoreTextureAndPixels = false)
    Parameters
    Type Name Description
    bool ignoreGroups

    True if do not require sprite group

    bool ignoreSpriteWithPaletteTag

    True if do not load sprites with Tag.Palette

    bool ignoreTextureAndPixels

    True if do not load pixel data and do not create textures

    Sheet(List<AngeSprite>, List<Atlas>, bool, bool, bool)

    Create a sheet with given data

    Declaration
    public Sheet(List<AngeSprite> sprites, List<Atlas> atlasInfo, bool ignoreGroups = false, bool ignoreSpriteWithIgnoreTag = true, bool ignoreTextureAndPixels = false)
    bool ignoreGroups

    True if do not require sprite group

    bool ignoreSpriteWithIgnoreTag

    True if do not load sprites with Tag.Palette

    bool ignoreTextureAndPixels

    True if do not load pixel data and do not create textures

    Fields

    Atlas

    All atlas instances inside this sheet

    Declaration
    public readonly List<Atlas> Atlas

    AtlasPool

    Declaration
    public readonly Dictionary<int, Atlas> AtlasPool

    GroupPool

    Declaration
    public readonly Dictionary<int, SpriteGroup> GroupPool

    Groups

    All sprite group instances inside this sheet

    Declaration
    public readonly List<SpriteGroup> Groups

    SpritePool

    Declaration
    public readonly Dictionary<int, AngeSprite> SpritePool

    Sprites

    All sprite instances inside this sheet

    Declaration
    public readonly List<AngeSprite> Sprites

    TexturePool

    Declaration
    public readonly Dictionary<int, object> TexturePool

    Methods

    AddSprite(AngeSprite)

    Add the given sprite into this sheet

    Declaration
    public bool AddSprite(AngeSprite sprite)
    Returns
    Type Description
    bool

    True if the sprite is successfuly added

    Clear()

    Clear all content inside this sheet

    Declaration
    public void Clear()

    CombineAllSheetInFolder(string, bool, string)

    Add all content from sheets from given folder into this sheet.

    Declaration
    public void CombineAllSheetInFolder(string folderPath, bool topOnly = false, string ignoreNameWithExtension = "")
    string ignoreNameWithExtension

    Ignore sheets with this name

    CombineSheet(Sheet, bool)

    Add all content from given sheet into this sheet.

    Declaration
    public void CombineSheet(Sheet sheet, bool renameDuplicateSprites = false)
    bool renameDuplicateSprites

    Set to false to skip the sprite with same name

    ContainGroup(int)

    True if there is a group with given ID.

    Declaration
    public bool ContainGroup(int id)

    ContainSprite(int)

    True if there is a sprite with given ID.

    Declaration
    public bool ContainSprite(int id)

    CreateSprite(string, IRect, int)

    Create a sprite without add into this sheet

    Declaration
    public AngeSprite CreateSprite(string name, IRect pixelRect, int atlasID)

    GetAvailableSpriteName(string)

    Get a new sprite name that be add into this sheet

    Declaration
    public string GetAvailableSpriteName(string basicName)

    GetSpriteAnimationDuration(SpriteGroup)

    Get how long does the given animation group takes in frame

    Declaration
    public int GetSpriteAnimationDuration(SpriteGroup aniGroup)

    IndexOfGroup(int)

    Find the group's index in the list

    Declaration
    public int IndexOfGroup(int id)
    Returns
    Type Description
    int

    -1 if the group not found

    IndexOfSprite(int)

    Find the sprite's index in the list

    Declaration
    public int IndexOfSprite(int id)
    Returns
    Type Description
    int

    -1 if the sprite not found

    LoadFromDisk(string)

    Declaration
    public bool LoadFromDisk(string path)

    MoveAtlas(int, int, bool)

    Move the atlas inside the atlas list

    Declaration
    public void MoveAtlas(int from, int to, bool intoFolder = false)

    RemoveAllAtlasAndSpritesInsideExcept(int)

    Declaration
    public void RemoveAllAtlasAndSpritesInsideExcept(int ignoreAtlasID)

    RemoveAtlasAndAllSpritesInside(int)

    Declaration
    public void RemoveAtlasAndAllSpritesInside(int atlasIndex)

    RemoveGroupAndAllSpritesInside(int)

    Declaration
    public void RemoveGroupAndAllSpritesInside(int groupIndex)

    RemoveSprite(int)

    Declaration
    public void RemoveSprite(int spriteIndex)

    RenameAtlas(int, string)

    Declaration
    public bool RenameAtlas(int atlasID, string newName)

    RenameSprite(AngeSprite, string)

    Declaration
    public bool RenameSprite(AngeSprite sprite, string newName)

    RenameSprite(int, string)

    Declaration
    public bool RenameSprite(int id, string newName)

    SaveToDisk(string)

    Declaration
    public void SaveToDisk(string path)

    SetData(List<AngeSprite>, List<Atlas>)

    Set the sprites and atlas data of this sheet

    Declaration
    public void SetData(List<AngeSprite> sprites, List<Atlas> atlasInfo)

    SyncSpritePixelsIntoTexturePool(AngeSprite)

    Update rendering texture for the sprite if the pixel content changed

    Declaration
    public void SyncSpritePixelsIntoTexturePool(AngeSprite sprite)

    TryGetSpriteFromAnimationFrame(SpriteGroup, int, out AngeSprite, int)

    Get current showing sprite from a animation group

    Declaration
    public bool TryGetSpriteFromAnimationFrame(SpriteGroup group, int localFrame, out AngeSprite sprite, int loopStart = -1)
    int localFrame

    Animation frame start from 0

    AngeSprite sprite

    Result sprite

    int loopStart

    Sprite index this animation start to play after it reach the end. Set to -1 to use loop start value from group.

    Returns
    Type Description
    bool

    True if the sprite is successfuly found

    TryGetTextureFromPool(int, out object)

    Get texture for rendering from given ID

    Declaration
    public bool TryGetTextureFromPool(int spriteID, out object texture)
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค