Removed graphic system file. Don't really need it as I wasn't using it to prove anything.
This commit is contained in:
parent
4daea58b69
commit
753992901e
@ -1,20 +0,0 @@
|
||||
#ifndef GRAPHICSSYSTEM_H
|
||||
#define GRAPHICSSYSTEM_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "GraphicsObject.h"
|
||||
|
||||
class GraphicsSystem
|
||||
{
|
||||
public:
|
||||
void AddObject(GraphicsObject *obj)
|
||||
{
|
||||
objects.push_back(obj);
|
||||
}
|
||||
|
||||
//private:
|
||||
std::vector<GraphicsObject*> objects;
|
||||
};
|
||||
|
||||
#endif
|
13
main.cpp
13
main.cpp
@ -1,22 +1,21 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "GraphicsSystem.h"
|
||||
#include <vector>
|
||||
|
||||
#include "GraphicsObject.h"
|
||||
#include "Ball.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
GraphicsSystem system;
|
||||
std::vector<GraphicsObject*> objects;
|
||||
|
||||
GraphicsObject graphics_obj(7);
|
||||
system.AddObject(&graphics_obj);
|
||||
objects.push_back(&graphics_obj);
|
||||
Ball ball1;
|
||||
system.AddObject(&ball1);
|
||||
objects.push_back(&ball1);
|
||||
Ball ball2;
|
||||
system.AddObject(&ball2);
|
||||
objects.push_back(&ball2);
|
||||
|
||||
for(auto obj : system.objects)
|
||||
for(auto obj : objects)
|
||||
for(auto i = 0; i < 5; ++i)
|
||||
std::cout << obj->X() << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user