🍏Game

Contains all functions from Game namespace.

-- Convert a 3D world coordinate to a 2D screen coordinate.
-- Parameters:
--    vector: pointer to an array of 3 floats,
--    representing the world coordinate.
-- Returns:
--     True if the conversion was successful and
--     the resulting screen coordinate is within the screen bounds,
--     false otherwise.
Game.WorldToScreen(vector)
-- Returns an last converted vector from function "WorldToScreen"
Game.GetLastConvertedToScreenVector()
-- Controls the current packet.
-- Parameters:
--     status: boolean true/false.
Game.SendPacket(status)
-- Creates a sound stream from a file specified by filename.
-- The resulting stream handle can be used to play the sound using BASS library.
-- Parameters:
--     path: the name of the sound file to load.
-- Returns:
--     The handle to the sound stream on success, or 0 on failure.
Game.LoadSound(path)
-- Plays a sound stream with a specified volume.
-- Parameters:
--     sound: the handle to the sound stream to play.
--     volume: the volume of the sound to play, in range 0-100.
Game.PlaySound(sound, volume)
-- Returns the current time in milliseconds since the game started.
-- Returns:
--     The current system time in milliseconds.
Game.GetTime()

Last updated