Demo update

-added 'dot' function to vector math
-fixed Circle tool rendering
-fixed some potentiall memory leaks
-added 'collision' module which now separates ShootGrid from SpaceInvaders demo
-separate some systems from demos to 'basic' module to better demos functionality sharing
-slow down snake
-added new graphics
-BrickBreaker demo now works (without blocks breaking and with bugged collision detection)

-some bug fixes
This commit is contained in:
Mergul 2020-07-08 22:09:10 +02:00
parent a0efa4e67d
commit 74179b4fc8
14 changed files with 871 additions and 468 deletions

View file

@ -213,7 +213,7 @@ struct GUIManager
static if(hasUDA!(member,GUIRange))
{
comp_edit.variables[comp_edit.used-1].int_.min = getUDAs!(member,GUIRange)[0].min;
comp_edit.variables[comp_edit.used-1].int_.max = getUDAs!(member,GUIRange)[1].max;
comp_edit.variables[comp_edit.used-1].int_.max = getUDAs!(member,GUIRange)[0].max;
}
/*{
comp_edit.variables[comp_edit.used-1].int_.min = int.min;

View file

@ -5,7 +5,8 @@ import bubel.ecs.system;
struct SystemGUI
{
const (char)* name;
System* system;
//System* system;
ushort id;
bool enabled = true;
}

View file

@ -26,6 +26,7 @@ struct ToolCircle
void draw(Renderer* renderer, vec2 position, float size, float edge = 1)
{
glDisable(GL_DEPTH_TEST);
position = position * renderer.view_size + renderer.view_pos;
vec2 sizes = renderer.view_size * size;
vec2 sizes2 = vec2(edge,0);