nngn
Loading...
Searching...
No Matches
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 rnd <const> = (function();
for i = 1, N do;
pos = {rnd(), rnd(), 0};
collider = colliders[math:rand_int(1, n)]})
collider
Definition bird.lua:2
for i
Definition font.lua:5
local n
Definition dump_lights.lua:5
local r
Definition gamma.lua:7
local N
Definition gamma.lua:5
math
Definition all.lua:8
pos
Definition lua_audio.cpp:17
auto rand_int(Math &m, std::optional< lua_Integer > v0, std::optional< lua_Integer > v1)
Definition lua_math.cpp:108
Definition audio.cpp:7
local rnd
Definition players.lua:9
#define C(T)

◆ entity< const >

local entity< const > = require "nngn.lib.entity"

◆ N< const >

local N< const > = 2 ^ 11