Game (functions)/Direction
From PMDOWiki
GAME:VectorToDirection(RogueElements.Loc)
Turns a vector (preferably a unit vector) into a cardinal or diagonal direction.
Arguments
v: The vector.
Returns
The direction as one of 8 values.
GAME:VectorToDirection(System.Double,System.Double)
Convenience function to get a vector's components from lua numbers(doubles)
Arguments
X: The X value of the vectorY: The Y value of the vector
Returns
The direction the vector points to as one of 8 values.
GAME:RandomDirection
Generates a random direction.
Returns
An 8-directional direction.
GAME:SetupLuaFunctions(RogueEssence.Script.LuaEngine)
Setups any extra functionalities for this object written on the lua side.
