#include "particle.h" #include Thing::Thing(float X, float Y, Type typee) { x = X; y = Y; type = typee; mDead = false; xi = 0; yi = 0; } Thing::Thing(float X, float Y, int Mass, Type typee) { x = X; y = Y; mass = Mass; type = typee; mDead = false; xi = 0; yi = 0; } //~Thing::Thing() //{ } void Thing::Move(float X, float Y) { x = X; y = Y; } void Thing::ChangeYi(float newi) { yi += newi; } void Thing::ChangeXi(float newi) { xi += newi; } void Thing::MakeYi(float newi) { yi = newi; } void Thing::MakeXi(float newi) { xi = newi; } void Thing::Alive() { mDead = false; } void Thing::ChangeAll(float newXi, float newYi, float newY, float newX, int newMass) { x = newX; y = newY; yi = newYi; xi = newXi; mass = newMass; } void Thing::Kill() { mDead = true; } float Thing::GetX() { return x; } float Thing::GetY() { return y; } float Thing::GetXi() { return xi; } float Thing::GetYi() { return yi; } int Thing::GetMass() { return mass; } bool Thing::Dead() { return mDead; } Type Thing::GetType(){ return type; } //////////////////////////////////////////////////////////////////////////////////////// Particle::Particle() :Thing( 0, 0, UNDEF) { } Particle::Particle( float X, float Y ) :Thing( X, Y, PARTICLE) { color.red = 1; color.blue = 1; color.green = 1; //mass = 1; } Particle::Particle( float X, float Y, RBG Color ) :Thing( X, Y, PARTICLE) { color.red = Color.red; color.blue = Color.blue; color.green = Color.green; //mass = 1; } Particle::Particle( float X, float Y, RBG Color, int Mass ) :Thing( X, Y, Mass, PARTICLE) { color.red = Color.red; color.blue = Color.blue; color.green = Color.green; } //~Particle() {} RBG Particle::GetColor(){ return color; } int Particle::GetAge() { return age; } /////////////////////////////////////////////////////////////////////////////////////// //class Object::Object() :Thing( 0, 0, UNDEF) { } Object::Object( float X, float Y ) :Thing( X, Y, OBJECT) { } Object::Object( float X, float Y, Image images ) :Thing( X, Y, OBJECT) { image = images; //mass = 1; } Object::Object( float X, float Y, Image images, int Mass ) :Thing( X, Y, Mass, OBJECT) { image = images; } //~Object::Object(); Image Object::GetImage() { return image; }