Search Results for

    Show / Hide Table of Contents

    Class WeaponSlot

    Used for weapons. Will adjusts effect positions based on length of the weapon sprites and disable effects if no sprites are set.

    Inheritance
    Object
    CustomizationSlot
    WeaponSlot
    Inherited Members
    CustomizationSlot._spriteRenderer
    CustomizationSlot._detailSpriteRenderer
    CustomizationSlot.IsHidden
    CustomizationSlot.Location
    CustomizationSlot.Sprite
    CustomizationSlot.OriginalSortOrder
    CustomizationSlot.SortOrder
    CustomizationSlot.DetailSortOrder
    CustomizationSlot.SetColors(Color, Color)
    CustomizationSlot.Clear()
    CustomizationSlot.Hide()
    CustomizationSlot.Show()
    CustomizationSlot.SetSortOver(CustomizationSlot)
    Namespace: CustomizableCharacters
    Assembly: cs.temp.dll.dll
    Syntax
    public class WeaponSlot : CustomizationSlot

    Properties

    StabEffect

    Used for weapons. Will adjusts effect positions based on length of the weapon sprites and disable effects if no sprites are set.

    Declaration
    public SpriteRenderer StabEffect { get; }
    Property Value
    Type Description
    SpriteRenderer

    SwingEffect

    Used for weapons. Will adjusts effect positions based on length of the weapon sprites and disable effects if no sprites are set.

    Declaration
    public SpriteRenderer SwingEffect { get; }
    Property Value
    Type Description
    SpriteRenderer

    Methods

    GetWeaponLength()

    Returns the length of the distance between hand and top of the weapon (usually weapon tip). This is done by the height if the weapon sprites.

    Declaration
    public float GetWeaponLength()
    Returns
    Type Description
    Single

    SetSprites(Sprite, Sprite)

    Sets the sprite and calculates the length, which is used for changing the position of the weapon effects.

    Declaration
    public override void SetSprites(Sprite sprite, Sprite detailSprite)
    Parameters
    Type Name Description
    Sprite sprite
    Sprite detailSprite
    Overrides
    CustomizationSlot.SetSprites(Sprite, Sprite)
    In This Article
    • Properties
      • StabEffect
      • SwingEffect
    • Methods
      • GetWeaponLength()
      • SetSprites(Sprite, Sprite)
    Back to top 2D Customizable Characters