Callback-Example/main.cpp

23 lines
408 B
C++
Raw Normal View History

#include <iostream>
#include "GraphicsSystem.h"
#include "GraphicsObject.h"
#include "Ball.h"
int main(int argc, char *argv[])
{
GraphicsSystem system;
GraphicsObject graphics_obj(7);
system.AddObject(&graphics_obj);
Ball ball1;
system.AddObject(&ball1);
Ball ball2;
system.AddObject(&ball2);
for(auto obj : system.objects)
for(auto i = 0; i < 5; ++i)
std::cout << obj->X() << std::endl;
}