first commit
This commit is contained in:
22
objects.h
Normal file
22
objects.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
Vector3 pos;
|
||||
Vector3 vel;
|
||||
float r;
|
||||
Color color;
|
||||
float restitution;
|
||||
} object;
|
||||
|
||||
object *newobj(Vector3 pos, float r, Color c, float rest)
|
||||
{
|
||||
object *obj = (object*)malloc(sizeof(object));
|
||||
obj->r = r;
|
||||
obj->pos = pos;
|
||||
obj->color = c;
|
||||
obj->vel = (Vector3){0, 0, 0};
|
||||
obj->restitution = rest;
|
||||
return obj;
|
||||
}
|
||||
Reference in New Issue
Block a user