Skip to content
Snippets Groups Projects
Commit 4298eae2 authored by Oliver Dimes's avatar Oliver Dimes
Browse files

Uploading Object Files

parent 9d857a0b
No related merge requests found
......@@ -6,9 +6,12 @@ enemy::enemy(float hp, float Level)
float enemyHp = hp;
float skillLevel = Level;
}
void enemy::draw()
{
}
enemy::~enemy()
{
......
//This is the enemy class, the home of the variable
/*
This is the enemy class, this acts as a global variable.
Every enemy type will use this class as a stepping stone for
all of the other NPCS
*/
#ifndef ENEMY_H
#define ENEMY_H
......@@ -7,8 +11,11 @@
class enemy
{
public:
enemy(float hp, float Level);
enemy(float hp, float Level); //These are the global values of the enemy
virtual void draw();
~enemy();
protected:
float xPos;
float yPos;
};
#endif
......@@ -26,7 +26,10 @@ void ofApp::draw(){
ofRect(ofGetWidth() / 2, ofGetHeight()*0.75, ofGetWidth() / 2, ofGetHeight()*0.25);
//Text for boxes
ofDrawBitmapString("test", ofGetWidth()*0.25,ofGetHeight()*0.85);
ofSetColor(255, 255, 255);
ofDrawBitmapString("Attack", ofGetWidth()*0.25,ofGetHeight()*0.85);
ofDrawBitmapString("Item", ofGetWidth()*0.75, ofGetHeight()*0.85);
}
//--------------------------------------------------------------
......
#include "trump.h"
#include "enemy.h"
trump::trump(float x, float y)
: enemy(10,100) {
xPos = x;
yPos = y;
ofMap(9, 0, 100, 0, 200);
}
void trump::draw() {
//Put visual code here
ofRect(10, 10, 100, 100);
}
trump.h 0 → 100644
#ifndef TRUMP_H
#define TRUMP_H
#include "ofMain.h"
#include "enemy.h"
class trump : public enemy {
public:
trump(float x, float y);
virtual void draw();
private:
ofMaterial material;
};
#endif
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment