Module: PseudoGame.game.WallSystem

Class that handles a game's walls

Functions

PseudoGame.game.WallSystem:new ([options[, style=nil]]) the constructor for a wall system
PseudoGame.game.WallSystem:wall ([height=options.spawn_distance][, hue_modifier=0], side, thickness[, speed_mult=1[, acceleration=0[, min_speed=0[, max_speed=0[, ping_pong=false[, curving=false]]]]]]) create a wall in the system
PseudoGame.game.WallSystem:get_wall_count () get the amount of walls present in the system
PseudoGame.game.WallSystem:set_speed ([speed=1]) set the speed for every wall (does not change any kind of acceleration options)
PseudoGame.game.WallSystem:set_curve_speed ([speed=1]) set the curve speed for every wall (does not change any kind of acceleration options)
PseudoGame.game.WallSystem:update (frametime) update the walls position
PseudoGame.game.WallSystem:overwrite () overwrite the w_wall, w_wallAdj, w_wallAcc and u_clearWalls functions to create/clear walls in this system
PseudoGame.game.WallSystem:restore () restore the original w_wall, w_wallAdj, w_wallAcc and u_clearWalls functions

Fields

pseudogame.game.wallsystem.style
pseudogame.game.wallsystem.options
pseudogame.game.wallsystem.polygon_collection
pseudogame.game.wallsystem.wall_height


Functions

🔗 PseudoGame.game.WallSystem:new ([options[, style=nil]])
the constructor for a wall system

Parameters:

Name Type(s) Description Default value
options Optional table some options for the wall system Undefined
timeline Optional Timeline the timeline to use (nil will use the default t_ functions) nil
despawn_distance Optional number the distance at which walls are removed l_getWallSpawnDistance() * 1.1
spawn_distance Optional number the distance at which walls are spawned (has to be smaller than despawn distance) l_getWallSpawnDistance()
despawn_radius Optional number the radius around the center that eats walls l_getRadiusMin() * (l_getPulse() / l_getPulseMin()) + l_getBeatPulse()
reverse_direction Optional bool makes walls move from the center out of the screen false
better_pivot_fade Optional bool makes walls fade into the pivot directly at the edge false
style Optional Style the style to use level_style

Returns:

    WallSystem
🔗 PseudoGame.game.WallSystem:wall ([height=options.spawn_distance][, hue_modifier=0], side, thickness[, speed_mult=1[, acceleration=0[, min_speed=0[, max_speed=0[, ping_pong=false[, curving=false]]]]]])
create a wall in the system

Parameters:

Name Type(s) Description Default value
height Optional number the height the wall will be spawned at options.spawn_distance
hue_modifier Optional number the modifier the hue of the wall will be adjusted by 0
side number the side to spawn the wall at Not applicable
thickness number the thickness the wall should have Not applicable
speed_mult Optional number the speedmult (will be multiplied with ugetSpeedMultDM()) 1
acceleration Optional number the acceleration (it will be adjusted using the difficulty mult) 0
min_speed Optional number the minimum speed the wall should have (will be multiplied with u_getSpeedMultDM()) 0
max_speed Optional number the maximum speed the wall should have (will be multiplied with u_getSpeedMultDM()) 0
ping_pong Optional bool will bounce between max and min speed if true false
curving Optional bool will make the wall a curving wall if true (uses speedmult, acceleration, min/maxspeed for curve speed instead of wall speed) false
🔗 PseudoGame.game.WallSystem:get_wall_count ()
get the amount of walls present in the system

Returns:

    number
🔗 PseudoGame.game.WallSystem:set_speed ([speed=1])
set the speed for every wall (does not change any kind of acceleration options)

Parameters:

Name Type(s) Description Default value
speed Optional number the speed mult (will be multiplied with u_getSpeedMultDM()) 1
🔗 PseudoGame.game.WallSystem:set_curve_speed ([speed=1])
set the curve speed for every wall (does not change any kind of acceleration options)

Parameters:

Name Type(s) Description Default value
speed Optional number the speed mult (will be multiplied with u_getSpeedMultDM()) 1
🔗 PseudoGame.game.WallSystem:update (frametime)
update the walls position

Parameters:

Name Type(s) Description
frametime number the time in 1/60s that passed since the last call of this function
🔗 PseudoGame.game.WallSystem:overwrite ()
overwrite the w_wall, w_wallAdj, w_wallAcc and u_clearWalls functions to create/clear walls in this system
🔗 PseudoGame.game.WallSystem:restore ()
restore the original w_wall, w_wallAdj, w_wallAcc and u_clearWalls functions

Fields

🔗 pseudogame.game.wallsystem.style
Name Type(s) Description
the Style style the wall system is using
🔗 pseudogame.game.wallsystem.options
Name Type(s) Description
the table options that were passed to the constructor
🔗 pseudogame.game.wallsystem.polygon_collection
Name Type(s) Description
the PolygonCollection collection of polygons representing the walls (use this for drawing)
🔗 pseudogame.game.wallsystem.wall_height
Name Type(s) Description
the number distance of the center to the highest wall in the system
generated by LDoc 1.5.0