mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 02:29:03 -06:00
Alias Lua random functions to Love2D's
This commit is contained in:
parent
9d5dbb4674
commit
7c32273971
6
main.lua
6
main.lua
@ -1,5 +1,4 @@
|
|||||||
function love.load()
|
function love.load()
|
||||||
math.randomseed(os.time())
|
|
||||||
highscores = {}
|
highscores = {}
|
||||||
love.graphics.setDefaultFilter("linear", "nearest")
|
love.graphics.setDefaultFilter("linear", "nearest")
|
||||||
require "load.rpc"
|
require "load.rpc"
|
||||||
@ -24,6 +23,11 @@ function love.load()
|
|||||||
-- used for screenshots
|
-- used for screenshots
|
||||||
GLOBAL_CANVAS = love.graphics.newCanvas()
|
GLOBAL_CANVAS = love.graphics.newCanvas()
|
||||||
|
|
||||||
|
-- aliasing to prevent people using math.random by accident
|
||||||
|
math.random = love.math.random
|
||||||
|
math.randomseed = love.math.setRandomSeed
|
||||||
|
math.randomseed(os.time())
|
||||||
|
|
||||||
-- init config
|
-- init config
|
||||||
initConfig()
|
initConfig()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user