AngeliA
Search Results for

    Show / Hide Table of Contents

    Struct OrientedSprite

    A set of AngeSprite ID that auto handles orientation logic

    Constructors

    OrientedSprite()

    Declaration
    public OrientedSprite()

    OrientedSprite(string, string)

    Create a new OSprite from current render sheet

    Declaration
    public OrientedSprite(string hostName, string attachmentName)
    Parameters
    Type Name Description
    string hostName

    Which character own this OSprite

    string attachmentName

    Which part of the character own this OSprite

    OrientedSprite(string, string, string)

    Create a new OSprite from current render sheet

    Declaration
    public OrientedSprite(string hostName, string attachmentName, string attachmentNameAlt)
    Parameters
    Type Name Description
    string hostName

    Which character own this OSprite

    string attachmentName

    Which part of the character own this OSprite

    string attachmentNameAlt

    Failback attachment name if "attachmentName" not found

    OrientedSprite(string, string, string, string)

    Create a new OSprite from current render sheet

    Declaration
    public OrientedSprite(string hostName, string attachmentName, string attachmentNameAltA, string attachmentNameAltB)
    Parameters
    Type Name Description
    string hostName

    Which character own this OSprite

    string attachmentName

    Which part of the character own this OSprite

    string attachmentNameAltA

    Failback attachment name if "attachmentName" not found

    string attachmentNameAltB

    Failback attachment name if "attachmentNameA" not found

    OrientedSprite(string, params string[])

    Create a new OSprite from current render sheet

    Declaration
    public OrientedSprite(string hostName, params string[] attachmentNames)
    Parameters
    Type Name Description
    string hostName

    Which character own this OSprite

    string[] attachmentNames

    Which part of the character own this OSprite. Will be load by the order of the array until one name is valid.

    Fields

    AttachmentName

    Name of the source unit (eg. "Tail" "UpperArm" "Mouth")

    Declaration
    public string AttachmentName

    SpriteID_BL

    Sprite ID for facing Back-Left

    Declaration
    public int SpriteID_BL

    SpriteID_BR

    Sprite ID for facing Back-Right

    Declaration
    public int SpriteID_BR

    SpriteID_FL

    Sprite ID for facing Front-Left

    Declaration
    public int SpriteID_FL

    SpriteID_FR

    Sprite ID for facing Front-Right

    Declaration
    public int SpriteID_FR

    Properties

    IsValid

    True if any sprite ID is not zero

    Declaration
    public readonly bool IsValid { get; }

    Methods

    GetID(bool, bool)

    Get the sprite ID for rendering

    Declaration
    public readonly int GetID(bool front, bool right)
    Parameters
    Type Name Description
    bool front

    True if the sprite is for facing front

    bool right

    True if the sprite is for facing right

    LoadFromSheet(string, string)

    Load this OSprite from current render sheet

    Declaration
    public bool LoadFromSheet(string hostName, string attachmentName)
    Parameters
    Type Name Description
    string hostName

    Which character own this OSprite

    string attachmentName

    Which part of the character own this OSprite

    Returns
    Type Description
    bool

    True if successfuly loaded

    TryGetSprite(bool, bool, int, out AngeSprite)

    Get the sprite for rendering

    Declaration
    public readonly bool TryGetSprite(bool front, bool right, int animationFrame, out AngeSprite sprite)
    Parameters
    Type Name Description
    bool front

    True if the sprite is for facing front

    bool right

    True if the sprite is for facing right

    int animationFrame

    Local frame for animation

    AngeSprite sprite

    Result sprite

    Returns
    Type Description
    bool

    True if the sprite is founded

    TryGetSpriteForGizmos(out AngeSprite)

    Get the sprite for rendering as gizmos

    Declaration
    public readonly bool TryGetSpriteForGizmos(out AngeSprite sprite)
    Parameters
    Type Name Description
    AngeSprite sprite

    Result sprite

    Returns
    Type Description
    bool

    True if the sprite is founded

    TryGetSpriteGroup(bool, bool, out SpriteGroup)

    Get the sprite group for rendering

    Declaration
    public readonly bool TryGetSpriteGroup(bool front, bool right, out SpriteGroup group)
    Parameters
    Type Name Description
    bool front

    True if the sprite is for facing front

    bool right

    True if the sprite is for facing right

    SpriteGroup group

    Result group

    Returns
    Type Description
    bool

    True if the group is founded

    TryGetSpriteWithoutAnimation(bool, bool, out AngeSprite)

    Get the sprite ID for rendering without auto loading animated sprites

    Declaration
    public readonly bool TryGetSpriteWithoutAnimation(bool front, bool right, out AngeSprite sprite)
    Parameters
    Type Name Description
    bool front

    True if the sprite is for facing front

    bool right

    True if the sprite is for facing right

    AngeSprite sprite

    Result sprite

    Returns
    Type Description
    bool

    True if the sprite is founded

    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค