PartSprite
< Modding | ComponentsModding/Components/PartSprite
Jump to navigation
Jump to search
Code location (what's this?):
Cosmoteer.Ships.Parts.Graphics.PartSprite
A part sub-component that renders a sprite, possibly attached to another component.
Alias "Sprite". Be aware that there are other types of sprite.
Inherits from OperationalChainablePartComponent
. This means it can both be attached to a part, and turned on/off based on a toggle's state.
Used by Parts to have certain types of visuals.
Name | Type | Required? | Buffable? | Default value | Description |
---|---|---|---|---|---|
Layer | ID<ShipRenderLayerRules> | Yes | - | - | The layer the sprite is drawn on. This decides what's drawn over what, and what's hidden by other visuals.
Layers cover all lower layers. |
RandomUVRotation | bool | - | - | - | ?? |
UseConstructionProgressAsDamage | bool | - | - | - | ?? |
ResetAnimationTrigger | ID<PartComponentRules>? | - | - | - | Presumably the reference to a trigger that will reset this sprite's animation. |
GetColorFrom | ID<PartComponentRules>? | - | - | - | Presumably the reference to a component that will provide the color for this sprite. |
Notes
Nothing yet.
Examples
Ammo Factory
factory_ammo has 2 components with Type = Sprite
, the one below and its flipped version :
FloorSprite
{
Type = Sprite
OnlyWithFlip = false
Location = [1, 1]
Layer = "floors"
DamageLevels
[
{
File = "floor.png"
Size = [2, 2]
}
{
File = "floor_33.png"
Size = [2, 2]
}
{
File = "floor_66.png"
Size = [2, 2]
}
]
}
Railgun
railgun_launcher has 3 components with Type = Sprite
, all related to the projectile it fires.