Module: PseudoGame.game.Style

Class for storing colors and some other visual settings (it does not do any weird calculations on top of them on its own! (like the normal game's styles do))

Functions

PseudoGame.game.Style:new (style_table) constructor for a style object
PseudoGame.game.Style:get_main_color () gets the main color
PseudoGame.game.Style:get_player_color () gets the player color
PseudoGame.game.Style:get_wall_color () gets the wall color
PseudoGame.game.Style:get_cap_color () gets the cap color
PseudoGame.game.Style:get_background_color (index) gets a background color
PseudoGame.game.Style:get_layer_color (index) gets a layer color
PseudoGame.game.Style:get_layer_spacing () gets the 3d layer spacing
PseudoGame.game.Style:get_connect_layers () gets if the 3d layers are supposed to be connected
PseudoGame.game.Style:get_depth () gets the style's 3d depth

Tables

PseudoGame.game.level_style a table that implements the style getters using the game's style functions (use this if you want to keep your existing style)


Functions

🔗 PseudoGame.game.Style:new (style_table)
constructor for a style object

Parameters:

Name Type(s) Description Default value
style_table table the table with the initial style options Not applicable
main_color table the main color of the style (formatted like this: {r, g, b, a}) Not applicable
player_color Optional table the player color (formatted like this: {r, g, b, a}) style_table.main_color
wall_color Optional table the wall color (formatted like this: {r, g, b, a}) style_table.main_color
cap_color table the cap color of the style (formatted like this: {r, g, b, a}) Not applicable
background_colors table background colors (formatted like this: {{r, g, b, a}, {r, g, b, a}, ...}) Not applicable
layer_colors table 3d layer colors (formatted like this: {{r, g, b, a}, {r, g, b, a}, ...}) Not applicable
layer_spacing Optional number the spacing between 3d layers 10
connect_layers Optional bool specifies if the 3d layers should be connected using extra polygons to create solid 3d false
gradient Optional bool specifies if the connected 3d layers should have gradients between the layers false

Returns:

    Style
🔗 PseudoGame.game.Style:get_main_color ()
gets the main color

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_player_color ()
gets the player color

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_wall_color ()
gets the wall color

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_cap_color ()
gets the cap color

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_background_color (index)
gets a background color

Parameters:

Name Type(s) Description
index number the index of the background panel

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_layer_color (index)
gets a layer color

Parameters:

Name Type(s) Description
index number the index of the 3d layer

Returns:

    table color formatted like this: {r, g, b, a}
🔗 PseudoGame.game.Style:get_layer_spacing ()
gets the 3d layer spacing

Returns:

    number
🔗 PseudoGame.game.Style:get_connect_layers ()
gets if the 3d layers are supposed to be connected

Returns:

    bool
🔗 PseudoGame.game.Style:get_depth ()
gets the style's 3d depth

Returns:

    number

Tables

🔗 PseudoGame.game.level_style
a table that implements the style getters using the game's style functions (use this if you want to keep your existing style)
generated by LDoc 1.5.0