AngeliA
Search Results for

    Show / Hide Table of Contents

    Class FrameworkUtil

    Utility class for the AngeliA framework

    Fields

    GAMEPAD_CODE

    ID of artwork sprite for gamepad button icons

    Declaration
    public static readonly Dictionary<GamepadKey, int> GAMEPAD_CODE

    RUN_CODE_ANALYSIS_SETTING_ID

    For remote setting between engine and rigged game

    Declaration
    public const int RUN_CODE_ANALYSIS_SETTING_ID = 895245367

    RUN_CODE_ANALYSIS_SETTING_SILENTLY_ID

    For remote setting between engine and rigged game

    Declaration
    public const int RUN_CODE_ANALYSIS_SETTING_SILENTLY_ID = 895245368

    Methods

    BlockRuleToDigit(BlockRule)

    Convert BlockRule struct into auto tiling rule digit

    Declaration
    public static int BlockRuleToDigit(BlockRule ruleStr)

    BreakEntityBlock(IBlockEntity)

    Remove given block entity from map and invoke corresponding callback functions. (Do not handle item drops)

    Declaration
    public static bool BreakEntityBlock(IBlockEntity eBlock)

    BroadcastBuff(IRect, int, int)

    Give buff for all buff holder in given rectangle range

    Declaration
    public static void BroadcastBuff(IRect range, int buffID, int duration = 1)

    BroadcastBuff(int, int, int, int, int)

    Give buff for all buff holder in given circle range

    Declaration
    public static void BroadcastBuff(int x, int y, int radius, int buffID, int duration = 1)

    ClampCells(Cell[], IRect, int, int)

    Declaration
    public static void ClampCells(Cell[] cells, IRect rect, int startIndex, int endIndex)

    ClampCells(Span<Cell>, IRect, int, int)

    Declaration
    public static void ClampCells(Span<Cell> cells, IRect rect, int startIndex, int endIndex)

    DeleteAllEmptyMaps(string)

    Declaration
    public static void DeleteAllEmptyMaps(string mapRoot)

    DigitToBlockRule(int)

    Convert auto tiling rule digit into BlockRule struct

    Declaration
    public static BlockRule DigitToBlockRule(int digit)

    DigitToRuleByte(int, byte[])

    Convert auto tiling rule digit into byte array

    Declaration
    public static void DigitToRuleByte(int digit, byte[] bytes)

    DrawAllCollidersAsGizmos(int, Int2, float, bool, bool, bool, bool, Color32[])

    Display current physics colliders with game gizmos functions

    Declaration
    public static void DrawAllCollidersAsGizmos(int physicsMask = 31, Int2 offset = default, float brightness = 1, bool ignoreNonOnewayTrigger = false, bool ignoreOnewayTrigger = false, bool useTechEffect = false, bool drawVelocity = false, Color32[] layerTints = null)
    Parameters
    Type Name Description
    int physicsMask

    Which physics layers are included

    Int2 offset

    Position offset for all gizmos

    float brightness

    0 means dark, 1 means normal color

    bool ignoreNonOnewayTrigger

    True if triggers that is not oneway gate are excluded

    bool ignoreOnewayTrigger

    True if oneway gates are excluded

    bool useTechEffect

    True if the gizmos glitchs

    bool drawVelocity

    True if draw the current velocity for rigidbody

    Color32[] layerTints

    Color for specified layers. Set to null to use default.

    DrawClockHands(IRect, int, int, int, Color32, int)

    Draw clock hands from in-game time

    Declaration
    public static void DrawClockHands(IRect rect, int handCode, int thickness, int thicknessSecond, Color32 tint, int z = -2147483648)
    Parameters
    Type Name Description
    IRect rect

    Rect position for clock face in global space

    int handCode

    Artwork sprite ID for the hand

    Color32 tint

    Color tint

    int z

    Z value for sort rendering cells

    DrawClockHands(int, int, int, int, int, int, Color32, int)

    Draw clock hands from in-game time

    Declaration
    public static void DrawClockHands(int centerX, int centerY, int radius, int handCode, int thickness, int thicknessSecond, Color32 tint, int z = -2147483648)
    Parameters
    Type Name Description
    int centerX

    Center position in global space

    int centerY

    Center position in global space

    int radius

    Radius of the clock face

    int handCode

    Artwork sprite ID for the hand

    Color32 tint

    Color tint

    int z

    Z value for sort rendering cells

    DrawClockPendulum(int, int, int, int, int, int, int, int, int)

    Draw the pendulum for clocks

    Declaration
    public static void DrawClockPendulum(int artCodeLeg, int artCodeHead, int x, int y, int length, int thickness, int headSize, int maxRot, int deltaX = 0)
    Parameters
    Type Name Description
    int artCodeLeg

    Artwork sprite ID for the long handle part

    int artCodeHead

    Artwork sprite ID for the head on the edge

    int x

    Center position in global space

    int y

    Center position in global space

    int length

    Length of the pendulum in global space

    int thickness

    Thichness of the leg in global space

    int headSize

    Size of the head in global space

    int maxRot

    Rotation amount

    int deltaX

    Extra position shift amount

    DrawEnvironmentShadow(Cell, int, int, byte, int)

    Draw a shadow for given rendering cell

    Declaration
    public static Cell DrawEnvironmentShadow(Cell source, int offsetX = -64, int offsetY = 0, byte alpha = 64, int z = -65520)
    Parameters
    Type Name Description
    Cell source

    Target rendering cell

    int offsetX

    Position offset X in global space

    int offsetY

    Position offset Y in global space

    int z

    Position Z for the shadow

    Returns
    Type Description
    Cell

    Rendering cell of the shadow

    DrawFrozenEffect(IRect, byte, int, Int2, int, int, int)

    Draw effect for frozen zone

    Declaration
    public static void DrawFrozenEffect(IRect rect, byte alpha, int count = 32, Int2 offset = default, int seed = 0, int size = 142, int z = 0)
    Parameters
    Type Name Description
    IRect rect

    Position range in global space

    int count

    Particle count at same time

    Int2 offset

    Position offset

    int seed

    Seed to generate random value

    int size

    Size of a single particle

    int z

    Z value to sort rendering cells

    DrawItemUsageBar(IRect, int, int)

    Draw usage bar UI

    Declaration
    public static void DrawItemUsageBar(IRect rect, int usage, int maxUsage)
    Parameters
    Type Name Description
    IRect rect

    Rect position in global space

    DrawLightenEffect(int, IRect, int, int)

    Draw effect for electric light coming out of an object

    Declaration
    public static void DrawLightenEffect(int spriteID, IRect rect, int count = 2, int size = 196)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID for a single lighten

    IRect rect

    Position range in global space

    int count

    Count of sprite at same time

    int size

    Size of a single sprite

    DrawLoopingActivatedHighlight(IRect, Color32, int, int)

    Draw a highlight effect

    Declaration
    public static void DrawLoopingActivatedHighlight(IRect targetRect, Color32 tint, int lineCount = 4, int duration = 22)
    Parameters
    Type Name Description
    IRect targetRect

    Rect position in global space

    Color32 tint

    Color tint

    int duration

    Duration in frame for a single loop

    DrawLoopingTriangleMark(IRect, int, Color32, Direction4, int, int, int, int)

    Draw a direction mark with looping moving triangles

    Declaration
    public static void DrawLoopingTriangleMark(IRect range, int frame, Color32 tint, Direction4 direction, int count, int size, int z, int speed)
    Parameters
    Type Name Description
    IRect range

    Rect position in global space

    int frame

    Current animation frame

    Color32 tint

    Color tint

    int count

    Triangle count

    int size

    Triangle size

    int z

    Z value for sort rendering cells

    int speed

    Moving speed of the triangle

    DrawOnFireEffect(int, IRect, int, int, int, int, int)

    Draw effect for object on fire

    Declaration
    public static void DrawOnFireEffect(int spriteID, IRect rect, int count = 2, int loop = 40, int size = 200, int seed = 0, int z = 2147483647)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID

    IRect rect

    Rect range in global space

    int count

    Rendering sprite count at same time

    int loop

    Duration for a single loop

    int size

    Size of a single sprite

    int seed

    Seed to generate random value

    int z

    Z value for sort rendering cells

    DrawPoisonEffect(int, IRect, int, int, int, int, int)

    Draw effect for object being poisoned

    Declaration
    public static void DrawPoisonEffect(int spriteID, IRect rect, int loop = 120, int count = 4, int seed = 0, int size = 132, int z = 2147483647)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID

    IRect rect

    Rect range in global space

    int loop

    Duration of a single animation loop

    int count

    Count of sprites at same time

    int seed

    Seed to generate random value

    int size

    Size of a single particle in global space

    int z

    Z value for sort rendering cells

    DrawPoseCharacterAsUI(IRect, PoseCharacterRenderer, int)

    Display target pose-styled character as UI (like the character preview in player menu)

    Declaration
    public static bool DrawPoseCharacterAsUI(IRect rect, PoseCharacterRenderer renderer, int animationFrame)
    Parameters
    Type Name Description
    IRect rect

    Rect position to display the UI in global space

    PoseCharacterRenderer renderer

    Target character

    int animationFrame

    Current frame for animation

    Returns
    Type Description
    bool

    True if the character is rendered

    DrawPoseCharacterAsUI(IRect, PoseCharacterRenderer, int, out IRect, out IRect)

    Display target pose-styled character as UI (like the character preview in player menu)

    Declaration
    public static bool DrawPoseCharacterAsUI(IRect rect, PoseCharacterRenderer renderer, int animationFrame, out IRect globalRect, out IRect uiRect)
    Parameters
    Type Name Description
    IRect rect

    Rect position to display the UI in global space

    PoseCharacterRenderer renderer

    Target character

    int animationFrame

    Current frame for animation

    Returns
    Type Description
    bool

    True if the character is rendered

    ForAllExistsWorldInRange(IBlockSquad, IRect, int, out int)

    Find all existing world position that overlap the given range. (256 results in maximal)

    Declaration
    public static Int3[] ForAllExistsWorldInRange(IBlockSquad squad, IRect overlapUnitRange, int z, out int count)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the world instance

    IRect overlapUnitRange

    Target range in unit space

    int z

    Position Z

    int count

    How many result is founded

    Returns
    Type Description
    Int3[]

    Array that holds the result

    ForAllWorldInRange(IRect, int, out int)

    Find all world position that overlap the given range. (256 results in maximal)

    Declaration
    public static Int3[] ForAllWorldInRange(IRect overlapUnitRange, int z, out int count)
    Parameters
    Type Name Description
    IRect overlapUnitRange

    Target range in unit space

    int z

    Position Z

    int count

    How many result is founded

    Returns
    Type Description
    Int3[]

    Array that holds the result

    GetAimingBuilderPositionFromKey(Character, BlockType, out int, out int, out bool, bool)

    Get aiming position for block building target with keyboard keys

    Declaration
    public static bool GetAimingBuilderPositionFromKey(Character holder, BlockType blockType, out int targetUnitX, out int targetUnitY, out bool requireEmbedAsElement, bool ignoreValid = false)
    Parameters
    Type Name Description
    Character holder

    Character that using the tool

    BlockType blockType

    Type of building block

    int targetUnitX

    Result position in unit space

    int targetUnitY

    Result position in unit space

    bool requireEmbedAsElement

    True if this block can be embed into other block

    bool ignoreValid

    Set to true to skip block building validation

    Returns
    Type Description
    bool

    True if valid position is founded

    GetAimingBuilderPositionFromMouse(Character, BlockType, out int, out int, out bool)

    Get aiming position for block building target with mouse

    Declaration
    public static bool GetAimingBuilderPositionFromMouse(Character holder, BlockType blockType, out int targetUnitX, out int targetUnitY, out bool requireEmbedAsElement)
    Parameters
    Type Name Description
    Character holder

    Character that using the tool

    BlockType blockType

    Type of building block

    int targetUnitX

    Result position in unit space

    int targetUnitY

    Result position in unit space

    bool requireEmbedAsElement

    True if this block can be embed into other block

    Returns
    Type Description
    bool

    True if the target is founded

    GetAimingPickerPositionFromKey(Character, out int, out int, bool, bool, bool)

    Get aiming position for block picking target with keyboard keys

    Declaration
    public static bool GetAimingPickerPositionFromKey(Character pHolder, out int targetUnitX, out int targetUnitY, bool allowPickBlockEntity = true, bool allowPickLevelBlock = true, bool allowPickBackgroundBlock = true)
    Parameters
    Type Name Description
    Character pHolder

    Character that using the tool

    int targetUnitX

    Result position in unit space

    int targetUnitY

    Result position in unit space

    bool allowPickBlockEntity

    True if the tool can pick entity blocks

    bool allowPickLevelBlock

    True if the tool can pick level blocks

    bool allowPickBackgroundBlock

    True if the tool can pick background blocks

    Returns
    Type Description
    bool

    True if valid position is founded

    GetAimingPickerPositionFromMouse(Character, int, out int, out int, out bool, bool, bool, bool)

    Get aiming position for block picking target with mouse

    Declaration
    public static bool GetAimingPickerPositionFromMouse(Character holder, int unitRange, out int targetUnitX, out int targetUnitY, out bool inRange, bool allowPickBlockEntity = true, bool allowPickLevelBlock = true, bool allowPickBackgroundBlock = true)
    Parameters
    Type Name Description
    Character holder

    Character that using the tool

    int unitRange

    Range limitation in unit space

    int targetUnitX

    Result position in unit space

    int targetUnitY

    Result position in unit space

    bool inRange

    True if the current mouse cursor is in range

    bool allowPickBlockEntity

    True if the tool can pick entity blocks

    bool allowPickLevelBlock

    True if the tool can pick level blocks

    bool allowPickBackgroundBlock

    True if the tool can pick background blocks

    Returns
    Type Description
    bool

    True if valid position is founded

    GetBlockRealName(string)

    Get name of a map block without hashtags

    Declaration
    public static string GetBlockRealName(string name)

    GetEntityPose(Entity, bool, int, out Entity, out Entity)

    Get FittingPose for given entity type from WorldSquad and stage.

    Declaration
    public static FittingPose GetEntityPose(Entity entity, bool horizontal, int mask, out Entity left_down, out Entity right_up)
    Parameters
    Type Name Description
    Entity entity

    Target entity

    bool horizontal

    True if the entity fits horizontaly

    int mask

    Physics layers to get the entity instance

    Entity left_down

    Nearby entity instance at left/down

    Entity right_up

    Nearby entity instance at right/up

    GetEntityPose(int, int, int, bool)

    Get FittingPose for given position and entity ID from WorldSquad. eg. 3 mushroom entities makes a tall mushroom, only the top one is the cap. So your entity renders as cap only when the fitting pose is FittingPose.Up.

    Declaration
    public static FittingPose GetEntityPose(int typeID, int unitX, int unitY, bool horizontal)
    Parameters
    Type Name Description
    int typeID

    Type of the target entity

    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    bool horizontal

    True if the entity fits horizontaly

    GetFlyingFormation(Int2, int, int)

    Get position for flying entities

    Declaration
    public static Int2 GetFlyingFormation(Int2 pos, int column, int instanceIndex)
    Parameters
    Type Name Description
    Int2 pos

    Center position

    int column

    Column of the current element

    int instanceIndex

    Local index of the current element

    Returns
    Type Description
    Int2

    Final position of this element

    GetFrameAmortizedValue(int, int)

    Used to calculate acceleration with intager. eg. When value is 2000, it means 2 unit every frame. When value is 500, it means 1 unit every 2 frames.

    Declaration
    public static int GetFrameAmortizedValue(int value1000, int frame = -2147483648)

    GetGameKeyLabel(Gamekey)

    Get display name for given game-key.

    Declaration
    public static string GetGameKeyLabel(Gamekey key)

    GetGroupInfoFromSpriteRealName(string, out string, out int)

    Get sprite group infomation from the name of artwork sprite

    Declaration
    public static bool GetGroupInfoFromSpriteRealName(string realName, out string groupName, out int groupIndex)
    Parameters
    Type Name Description
    string realName

    Name without hashtags

    string groupName

    Name without index

    int groupIndex

    Index in group

    Returns
    Type Description
    bool

    True if the data successfuly calculated

    GetItemTypeIcon(int)

    Get type icon artwork sprite ID for given item

    Declaration
    public static int GetItemTypeIcon(int itemID)

    GetOnewayTag(Direction4)

    Get tag for oneway gate that facing to given direction

    Declaration
    public static Tag GetOnewayTag(Direction4 gateDirection)

    GetPlayerHoldingHandTool()

    Get global single instance of the handtool that player currently equipping

    Declaration
    public static HandTool GetPlayerHoldingHandTool()

    GetRuleIndex(IList<AngeSprite>, int, int, int, int, int, int, int, int, int)

    Find which tile in the given list conforms the auto tiling rule

    Declaration
    public static int GetRuleIndex(IList<AngeSprite> sprites, int ruleDigit, int tl, int tm, int tr, int ml, int mr, int bl, int bm, int br)
    Parameters
    Type Name Description
    IList<AngeSprite> sprites

    Source list

    int ruleDigit

    Int data of the tiling rule. Get this data with FrameworkUtil.BlockRuleToDigit

    int tl

    ID for block at top-left

    int tm

    ID for block at top

    int tr

    ID for block at top-right

    int ml

    ID for block at left

    int mr

    ID for block at right

    int bl

    ID for block at bottom-left

    int bm

    ID for block at bottom

    int br

    ID for block at bottom-right

    Returns
    Type Description
    int

    Index of the founded sprite

    GetScaledAudioVolume(int, int)

    Scale the given audio volume

    Declaration
    public static float GetScaledAudioVolume(int volume, int scale = 1000)
    int scale

    0 means 0%, 1000 means 100%

    GetSpriteInfoFromName(string, out string, out bool, out Tag, out BlockRule, out bool, out int, out int, out int?, out int?)

    Get infomation from naming tag of an artwork sprite

    Declaration
    public static void GetSpriteInfoFromName(string name, out string realName, out bool isTrigger, out Tag tag, out BlockRule rule, out bool noCollider, out int offsetZ, out int aniDuration, out int? pivotX, out int? pivotY)
    Parameters
    Type Name Description
    string name

    Full name of the artwork sprite

    string realName

    Name without hashtag

    bool isTrigger

    True if this sprite is trigger

    Tag tag

    Tag value of this sprite

    BlockRule rule

    Rule for auto tiling in map editor

    bool noCollider

    True if this sprite ignore collider

    int offsetZ

    Z value for sort rendering cells

    int aniDuration

    Duration in frame for animation

    GetSummaryTint(Color32[])

    Get average color of given pixels

    Declaration
    public static Color32 GetSummaryTint(Color32[] pixels)

    GiveBuffFromMap(IWithCharacterBuff, int, int, int, int)

    Try get buff from map element at given unit position

    Declaration
    public static void GiveBuffFromMap(IWithCharacterBuff wBuff, int unitX = -2147483648, int unitY = -2147483648, int unitZ = -2147483648, int duration = -1)

    HasOnewayTag(Tag)

    True if the given tag contains oneway gate tag.

    Declaration
    public static bool HasOnewayTag(Tag tag)

    HasPickableBlockAt(int, int, bool, bool, bool)

    True if found any block can be pick at given position

    Declaration
    public static bool HasPickableBlockAt(int unitX, int unitY, bool allowPickBlockEntity = true, bool allowPickLevelBlock = true, bool allowPickBackgroundBlock = true)
    Parameters
    Type Name Description
    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    bool allowPickBlockEntity

    True if entity blocks will be picked

    bool allowPickLevelBlock

    True if level blocks will be picked

    bool allowPickBackgroundBlock

    True if background blocks will be picked

    HasSystemNumber(IBlockSquad, int, int, int)

    True if there is system number at given position

    Declaration
    public static bool HasSystemNumber(IBlockSquad squad, int unitX, int unitY, int z)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int z

    Position Z

    HighlightBlink(Cell, float, float, bool, bool)

    Blink the given cell for action target highlighting

    Declaration
    public static void HighlightBlink(Cell cell, float pivotX = 0.5, float pivotY = 0, bool horizontal = true, bool vertical = true)
    bool horizontal

    True if the target attached with nearby entity in left or right

    bool vertical

    True if the target attached with nearby entity in up or down

    InvokeBlockPicked(int, IRect)

    Invoke function for map block get picked

    Declaration
    public static void InvokeBlockPicked(int spriteID, IRect rect)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID

    IRect rect

    Starting rect position in global space

    InvokeCameOutOfWater(Rigidbody, Entity)

    Invoke function for object get out of water

    Declaration
    public static void InvokeCameOutOfWater(Rigidbody rig, Entity water)
    Parameters
    Type Name Description
    Rigidbody rig

    Target object

    Entity water

    Water entity instance. Null if water is from map block

    InvokeCheatPerformed(string)

    Invoke function for a cheat code get performed

    Declaration
    public static void InvokeCheatPerformed(string cheatCode)
    Parameters
    Type Name Description
    string cheatCode

    The performed cheat code

    InvokeErrorHint(Entity, int)

    Invoke animation hint for error

    Declaration
    public static void InvokeErrorHint(Entity holder, int id)
    Parameters
    Type Name Description
    Entity holder

    Entity that get the error

    int id

    Artwork sprite ID for the icon inside

    InvokeErrorHint(int, int, int)

    Invoke animation hint for error

    Declaration
    public static void InvokeErrorHint(int x, int y, int id)
    Parameters
    Type Name Description
    int x

    Position in global space

    int y

    Position in global space

    int id

    Artwork sprite ID for the icon inside

    InvokeFallIntoWater(Rigidbody, Entity)

    Invoke function for object get into water

    Declaration
    public static void InvokeFallIntoWater(Rigidbody rig, Entity water)
    Parameters
    Type Name Description
    Rigidbody rig

    Target object

    Entity water

    Water entity instance. Null if water is from map block

    InvokeItemCollected(Entity, int, int)

    Invoke function for item get collected by a character

    Declaration
    public static void InvokeItemCollected(Entity collector, int id, int count)
    Parameters
    Type Name Description
    Entity collector

    Character that collect the item

    int id

    ID of the item

    int count

    How many items get collected

    InvokeItemCollected(int, int, int, int)

    Invoke function for item get collected by a character

    Declaration
    public static void InvokeItemCollected(int id, int x, int y, int count)
    Parameters
    Type Name Description
    int id

    ID of the item

    int x

    Position in global space

    int y

    Position in global space

    int count

    How many items get collected

    InvokeItemDamage(Character, int, int)

    Invoke function for item being damaged/broken

    Declaration
    public static void InvokeItemDamage(Character holder, int fromID, int toID)
    Parameters
    Type Name Description
    Character holder

    Character that own the item

    int fromID

    ID of the item before it broke

    int toID

    ID of the item after it broke

    InvokeItemLost(Character, int)

    Invoke function for character lost an item

    Declaration
    public static void InvokeItemLost(Character holder, int id)
    Parameters
    Type Name Description
    Character holder

    Character that lost the item

    int id

    ID of the item

    InvokeItemUnlocked(int)

    Invoke function for item being unlocked

    Declaration
    public static void InvokeItemUnlocked(int itemID)
    Parameters
    Type Name Description
    int itemID

    ID of the unlocked item

    InvokeObjectBreak(int, IRect)

    Invoke function for object broke animation

    Declaration
    public static void InvokeObjectBreak(int spriteID, IRect rect)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID

    IRect rect

    Starting rect position in global space

    InvokeObjectFreeFall(int, int, int, int, int, int, int, int, bool)

    Invoke function for free fall animation

    Declaration
    public static void InvokeObjectFreeFall(int spriteID, int x, int y, int speedX = 0, int speedY = 0, int rotation = -2147483648, int rotationSpeed = 0, int gravity = 5, bool flipX = false)
    Parameters
    Type Name Description
    int spriteID

    Artwork sprite ID

    int x

    Start position X in global space

    int y

    Start position Y in global space

    int speedX

    Initial speed X

    int speedY

    Initial speed Y

    int rotation

    Initial rotation

    bool flipX

    True if artwork sprite flip horizontaly

    InvokeOnCharacterCrash(Entity)

    Invoke function for character crash

    Declaration
    public static void InvokeOnCharacterCrash(Entity target)

    InvokeOnCharacterFly(Entity)

    Invoke function for character fly

    Declaration
    public static void InvokeOnCharacterFly(Entity target)

    InvokeOnCharacterJump(Entity)

    Invoke function for character jumps

    Declaration
    public static void InvokeOnCharacterJump(Entity target)

    InvokeOnCharacterPassOut(Entity)

    Invoke function for character get pass out

    Declaration
    public static void InvokeOnCharacterPassOut(Entity target)

    InvokeOnCharacterPound(Entity)

    Invoke function for character ground pound

    Declaration
    public static void InvokeOnCharacterPound(Entity target)

    InvokeOnCharacterSleeping(Entity)

    Invoke function for a character is sleeping

    Declaration
    public static void InvokeOnCharacterSleeping(Entity target)

    InvokeOnCharacterSlideStepped(Entity)

    Invoke function for character slide with a step

    Declaration
    public static void InvokeOnCharacterSlideStepped(Entity target)

    InvokeOnCharacterTeleport(Entity)

    Invoke function for character perform a teleport

    Declaration
    public static void InvokeOnCharacterTeleport(Entity target)

    InvokeOnFootStepped(Entity)

    Invoke function for a character walks with a foot step

    Declaration
    public static void InvokeOnFootStepped(Entity target)

    Number_to_SystemNumberID(int)

    Convert number into system number map element ID. 0 by default.

    Declaration
    public static int Number_to_SystemNumberID(int number)

    PaintBlock(int, int, int, bool)

    Paint the map block with BlockColoringSystem at given position

    Declaration
    public static void PaintBlock(int unitX, int unitY, int blockColorID, bool overrideExistingElement = false)
    Parameters
    Type Name Description
    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int blockColorID

    ID of BlockColor's subclass as a map element

    bool overrideExistingElement

    True if existing map element at given position will be override

    PerformSpringBounce(Entity, Direction4, int, int)

    Bounce entities on stage for once

    Declaration
    public static bool PerformSpringBounce(Entity springEntity, Direction4 direction, int power, int powerSide = 0)
    Parameters
    Type Name Description
    Entity springEntity

    Entity that exists as the spring

    Direction4 direction

    Direction that the spring power goes

    int power

    Initial speed for entities get bounced

    int powerSide

    Initial speed on side direction for entities get bounced

    Returns
    Type Description
    bool

    True if any entity get bounced

    PerformSpringBounce(Rigidbody, Entity, Direction4, int, int)

    Bounce the given target for once

    Declaration
    public static void PerformSpringBounce(Rigidbody target, Entity spring, Direction4 direction, int power, int powerSide = 0)
    Parameters
    Type Name Description
    Rigidbody target

    Target to get bounce

    Entity spring

    Entity that exists as the spring

    Direction4 direction

    Direction that the spring power goes

    int power

    Initial speed for entities get bounced

    int powerSide

    Initial speed on side direction for entities get bounced

    PickBlockAt(int, int, bool, bool, bool, bool, bool)

    Perform a block pick

    Declaration
    public static bool PickBlockAt(int unitX, int unitY, bool allowPickBlockEntity = true, bool allowPickLevelBlock = true, bool allowPickBackgroundBlock = true, bool dropItemAfterPicked = true, bool allowMultiplePick = false)
    Parameters
    Type Name Description
    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    bool allowPickBlockEntity

    True if entity blocks will be picked

    bool allowPickLevelBlock

    True if level blocks will be picked

    bool allowPickBackgroundBlock

    True if background blocks will be picked

    bool dropItemAfterPicked

    True if spawn an ItemHolder with the block

    bool allowMultiplePick

    True if pick more than one block with one function call

    Returns
    Type Description
    bool

    True if any block is picked

    PlaySoundAtPosition(int, Int2, float, float)

    Play a sound like it cames from the given position

    Declaration
    public static void PlaySoundAtPosition(int id, Int2 globalPosition, float volume = 1, float pitch = 1)
    Parameters
    Type Name Description
    int id

    Audio ID

    Int2 globalPosition

    Position in global space

    PutBlockTo(int, BlockType, int, int)

    Build a block into the map

    Declaration
    public static bool PutBlockTo(int blockID, BlockType blockType, int targetUnitX, int targetUnitY)
    Parameters
    Type Name Description
    int blockID

    ID of the building block

    BlockType blockType

    Type of the building block

    int targetUnitX

    Target position X in unit space

    int targetUnitY

    Target position Y in unit space

    Returns
    Type Description
    bool

    True if the block is built

    ReadSystemNumber(IBlockSquad, int, int, int, Direction4, out int)

    Get system number at given position from map in specified direction

    Declaration
    public static bool ReadSystemNumber(IBlockSquad squad, int unitX, int unitY, int z, Direction4 direction, out int number)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int z

    Position Z

    Direction4 direction

    Which direction should it reads

    int number

    Result number

    Returns
    Type Description
    bool

    True if the number is founded

    ReadSystemNumber(IBlockSquad, int, int, int, out int)

    Get system number at given position from map. (Left-to-right then up-to-down)

    Declaration
    public static bool ReadSystemNumber(IBlockSquad squad, int unitX, int unitY, int z, out int number)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int z

    Position Z

    int number

    Result number

    Returns
    Type Description
    bool

    True if the number is founded

    RedirectForRule(IBlockSquad, IRect, int)

    Auto tile all map blocks inside given range

    Declaration
    public static void RedirectForRule(IBlockSquad squad, IRect unitRange, int z)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    IRect unitRange

    Target range in unit space

    int z

    Position Z

    RedirectForRule(IBlockSquad, int, int, int, BlockType)

    Auto tile map block in given position and all tiles nearby

    Declaration
    public static void RedirectForRule(IBlockSquad squad, int unitX, int unitY, int z, BlockType type)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Position in unit space

    int unitY

    Position in unit space

    int z

    Position z

    BlockType type

    Type of the auto tile block

    RemapCells(Cell[], int, int, IRect, IRect, int, int, bool)

    Remap the position and size of given rendering cells

    Declaration
    public static void RemapCells(Cell[] cells, int cellIndexStart, int cellIndexEnd, IRect from, IRect to, int fitPivotX = 500, int fitPivotY = 500, bool fit = true)
    int cellIndexStart

    Start index of remap logic

    int cellIndexEnd

    End index of remap logic (exclude)

    IRect from

    Remap from this range (global space)

    IRect to

    Remap to this range (global space)

    bool fit

    True if keep the aspect ratio by resize the cells

    RemapCells(Cell[], int, int, IRect, IRect, out int, int, int, bool)

    Remap the position and size of given rendering cells

    Declaration
    public static void RemapCells(Cell[] cells, int cellIndexStart, int cellIndexEnd, IRect from, IRect to, out int minZ, int fitPivotX = 500, int fitPivotY = 500, bool fit = true)
    int cellIndexStart

    Start index of remap logic

    int cellIndexEnd

    End index of remap logic (exclude)

    IRect from

    Remap from this range (global space)

    IRect to

    Remap to this range (global space)

    int minZ

    Minimal Z value for sort rendering cells

    bool fit

    True if keep the aspect ratio by resize the cells

    RemapCells(Span<Cell>, int, int, IRect, IRect, int, int, bool)

    Remap the position and size of given rendering cells

    Declaration
    public static void RemapCells(Span<Cell> cells, int cellIndexStart, int cellIndexEnd, IRect from, IRect to, int fitPivotX = 500, int fitPivotY = 500, bool fit = true)
    int cellIndexStart

    Start index of remap logic

    int cellIndexEnd

    End index of remap logic (exclude)

    IRect from

    Remap from this range (global space)

    IRect to

    Remap to this range (global space)

    bool fit

    True if keep the aspect ratio by resize the cells

    RemapCells(Span<Cell>, int, int, IRect, IRect, out int, int, int, bool)

    Remap the position and size of given rendering cells

    Declaration
    public static void RemapCells(Span<Cell> cells, int cellIndexStart, int cellIndexEnd, IRect from, IRect to, out int minZ, int fitPivotX = 500, int fitPivotY = 500, bool fit = true)
    int cellIndexStart

    Start index of remap logic

    int cellIndexEnd

    End index of remap logic (exclude)

    IRect from

    Remap from this range (global space)

    IRect to

    Remap to this range (global space)

    int minZ

    Minimal Z value for sort rendering cells

    bool fit

    True if keep the aspect ratio by resize the cells

    RemoveFromWorldMemory(Entity)

    Remove target entity from world data. Only work when entity spawned from map.

    Declaration
    public static void RemoveFromWorldMemory(Entity entity)

    ResetShoulderAndUpperArmPos(PoseCharacterRenderer, bool, bool)

    Reset the shoulder and upper arm position for given pose-styled character

    Declaration
    public static void ResetShoulderAndUpperArmPos(PoseCharacterRenderer rendering, bool resetLeft = true, bool resetRight = true)
    Parameters
    Type Name Description
    PoseCharacterRenderer rendering

    Target character

    RuleByteToDigit(byte[])

    Convert byte array into auto tiling rule digit

    Declaration
    public static int RuleByteToDigit(byte[] singleRule)

    RunAngeliaCodeAnalysis(bool, bool, bool)

    Perform analyses for current AngeliA project and log the report

    Declaration
    public static void RunAngeliaCodeAnalysis(bool onlyLogWhenWarningFounded = false, bool fixScriptFileName = false, bool checkNoItemCombination = true)

    RunBuiltInSpriteAnalysys(bool)

    Perform checking logic for checking built-in sprite sync with artwork sheet or not

    Declaration
    public static void RunBuiltInSpriteAnalysys(bool onlyLogWhenWarningFounded = false)

    RunEmptyScriptFileAnalysis(string, bool)

    Check for empty script file in given project root

    Declaration
    public static void RunEmptyScriptFileAnalysis(string rootPath, bool onlyLogWhenWarningFounded = false)

    SearchlightBlockCheck(IBlockSquad, Int3, Direction8?, int, bool)

    True if any block founded inside given range. Search blocks with specific order to lower the CPU usage.

    Declaration
    public static bool SearchlightBlockCheck(IBlockSquad squad, Int3 startUnitPoint, Direction8? direction, int unitDistance = 128, bool reverse = false)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of map blocks

    Int3 startUnitPoint

    Position to start searching in unit space

    Direction8? direction

    Direction of the search operation facing. Set to null to make it search in circle range.

    int unitDistance

    Maximal distance for the search in unit space

    bool reverse

    True if search blocks from far side first

    SpawnItemFromMap(IBlockSquad, int, int, int, int, int, int, bool)

    Spawn item based on items list from map. This is used for the map chest.

    Declaration
    public static void SpawnItemFromMap(IBlockSquad squad, int unitX, int unitY, int z, int maxDeltaX = 1024, int maxDeltaY = 1024, int placeHolderID = 0, bool spawnEntity = true)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Position X in unit space

    int unitY

    Position Y in unit space

    int z

    Position Z

    int maxDeltaX

    Limitation on horizontal checking distance

    int maxDeltaY

    Limitation on vertical checking distance

    int placeHolderID

    Set spawned item into this ID

    bool spawnEntity

    True if spawn the entity that paint as map element

    SpiralSpinningCellEffect(int, int, int, int, int, bool)

    Draw spinning effect for teleporting with portal

    Declaration
    public static void SpiralSpinningCellEffect(int localFrame, int pointX, int pointY, int duration, int cellIndexStart, bool reverseSpin = false)
    int pointX

    Center position in global space

    int pointY

    Center position in global space

    int duration

    Total duration of the animation

    int cellIndexStart

    Start index of target rendering cells in current rendering layer

    SystemNumberID_to_Number(int)

    Convert system number ID into the number it represents

    Declaration
    public static int SystemNumberID_to_Number(int id)

    Time01_to_TimeDigit(float, out int, out int, out int)

    Convert a float value into time

    Declaration
    public static void Time01_to_TimeDigit(float time01, out int hour, out int minute, out int second)
    Parameters
    Type Name Description
    float time01

    0 means 0:00, 0.5 means 12:00. 1 means 24:00

    TimeDigit_to_Time01(int, int, int)

    Convert time into a float value

    Declaration
    public static float TimeDigit_to_Time01(int hour, int minute, int second)
    Returns
    Type Description
    float

    0 means 0:00, 0.5 means 12:00. 1 means 24:00

    TryEjectOutsideGround(Rigidbody, int, int, int)

    Move the given rigidbody to closest empty space nearby

    Declaration
    public static void TryEjectOutsideGround(Rigidbody rig, int collisionMask = 0, int unitRange = 2, int speed = 32)
    int collisionMask

    Which physics layers should count as "Ground"

    int unitRange

    How far can it move in unit space

    int speed

    How fast will it move

    TryGetEmptyPlaceNearbyForEntity(int, int, int, out int, out int, int, bool)

    Find an empty place on map nearby given position for placing an entity

    Declaration
    public static bool TryGetEmptyPlaceNearbyForEntity(int unitX, int unitY, int z, out int resultUnitX, out int resultUnitY, int maxRange = 8, bool preferNoSolidLevel = true)
    Parameters
    Type Name Description
    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int z

    Position Z

    int resultUnitX

    Position founded in unit space

    int resultUnitY

    Position founded in unit space

    int maxRange

    Maximal searching range in unit space

    bool preferNoSolidLevel

    Set to true to put this entity into place without solid level blocks

    Returns
    Type Description
    bool

    True if the place is founded

    TryGetOnewayDirection(Tag, out Direction4)

    Get direction from a single oneway gate tag. The tag value can only be a single oneway gate tag.

    Declaration
    public static bool TryGetOnewayDirection(Tag tag, out Direction4 direction)

    TryGetSingleSystemNumber(IBlockSquad, int, int, int, out int)

    Get a single digit of system number at given position from map

    Declaration
    public static bool TryGetSingleSystemNumber(IBlockSquad squad, int unitX, int unitY, int z, out int digitValue)
    Parameters
    Type Name Description
    IBlockSquad squad

    Source of the map blocks

    int unitX

    Target position X in unit space

    int unitY

    Target position Y in unit space

    int z

    Position Z

    int digitValue

    Result of the digit

    Returns
    Type Description
    bool

    True if the digit is founded

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