nngn
Loading...
Searching...
No Matches
Functions
|
Variables
colliders.lua File Reference
Functions
function
demo_start
()
end
Variables
local
entity< const >
= require "nngn.lib.entity"
local
N< const >
= 2 ^ 11
local
C< const >
= Collider
local
colliders< const >
Function Documentation
◆
demo_start()
function demo_start
(
)
Variable Documentation
◆
C< const >
local
C
<
const
> = Collider
◆
colliders< const >
local colliders<
const
>
Initial value:
= {;
{type =
C
.AABB, flags =
C
.SOLID, bb = 8};
{type =
C
.BB, flags =
C
.SOLID, bb = 8, rot =
nngn
:
math
():rand()};
{type =
C
.SPHERE, flags =
C
.SOLID,
r
= 4};
local
n <const>
= #colliders;
local
math <const>
=
nngn
:
math
();
local
rnd <const>
= (
function
();
for
i
= 1,
N
do
;
pos
= {
rnd
(),
rnd
(), 0};
collider
= colliders[
math
:
rand_int
(1,
n
)]})
collider
collider
Definition
bird.lua:2
i
for i
Definition
font.lua:5
n
local n
Definition
dump_lights.lua:5
r
local r
Definition
gamma.lua:7
N
local N
Definition
gamma.lua:5
math
math
Definition
all.lua:8
pos
pos
Definition
lua_audio.cpp:17
anonymous_namespace{lua_math.cpp}::rand_int
auto rand_int(Math &m, std::optional< lua_Integer > v0, std::optional< lua_Integer > v1)
Definition
lua_math.cpp:108
nngn::lua::type::function
@ function
nngn
Definition
audio.cpp:7
rnd
local rnd
Definition
players.lua:9
C
#define C(T)
◆
entity< const >
local
entity
<
const
> = require "nngn.lib.entity"
◆
N< const >
local
N
<
const
> = 2 ^ 11
demos
colliders.lua
Generated by
1.11.0