summaryrefslogtreecommitdiff
path: root/object_base.cpp
blob: d04d0f529e508a5301aff5dbbc977c0136526914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include <cassert>
#include <SFML/Graphics.hpp>
#include "object_base.h"
#include "library.h"

using namespace std;


Object::Object(void){
	log("Object constructed");
}
Object::Object(double x,double y):x(x),y(y){
	log("Object constructed at position");
}
Object::~Object(void){
	log("Object destructed");
}

void Object::create(void){}
void Object::destroy(void){}
void Object::step(void){}

void Object::draw(void){
	if(!sprite_index){
		return;
	}
	sprite_index->sf_sprite.setPosition(sf::Vector2f(x,y));
	window.draw(sprite_index->sf_sprite);
}