FoliageHandle beta
Interface of @v12-engine/client
export interface FoliageHandleA layer's grass and bushes as a game's code reaches them on a screen (client.foliage(layer)): the look read and changed while the game runs, of the layer and of each style, and the grass moved by hand. Changes are this screen's alone, and stay over whatever look the layer is given after (the game's file again, the rules): what every player is to see is the rules' (world.setEnvironment({ bushes })). A change of how many there are, how big or what colour lays again only the chunks of the map that hold the styles it reaches; one of what is read as they are drawn (the sway, the shakes, the levels, the sound) lays nothing. Bushes drawn as models are laid again whole
Members
disturb
disturb(at: Vec2, strength?: number): void;Shakes it at a place, as one moving through would (strength 1): an explosion, a deer
flatten
flatten(where: AreaShape | readonly number[], amount?: number): void;Lays grass flat over a shape or cells, on this screen: 1 flat (when left out), 0 standing again at once. It stands up again over its style's walked.recover seconds, never where that is 0. Bushes drawn as models are never laid flat
layer
readonly layer: string;The layer of cells it is drawn over
look
readonly look: FoliageLookParts;The look as drawn now: the code's, the game's file's and the map's over each other, by its groups
onChange
onChange(listener: () => void): () => void;Told when its look changed, by whatever changed it. Gives back what stops it
removeStyle
removeStyle(value: number): void;Takes what a style says of its own away: it is drawn as the layer
setLook
setLook(change: FoliageLook): void;Changes the layer's look, field by field over what it is (layFoliageLook)
setStyle
setStyle(value: number, change: FoliageStyleLook | false): void;Changes a style's look, field by field over what it says now; false for a style nothing is drawn of
stats
readonly stats: FoliageStats;What it costs now (FoliageStats)
style
style(value: number): Omit<FoliageLookParts, 'styles'> | false;The look a style is drawn with now, by the value of its cells: its own over the layer's; false for one not drawn
styles
styles(): readonly number[];The values that have a look of their own