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

Intial commit

parents
Branches
No related merge requests found
Pipeline #1486 canceled with stages
#include "enemy.h"
enemy::enemy(float hp, float Level)
{
//These are two statistics we will be using with our program
float enemyHp = hp;
float skillLevel = Level;
}
enemy::~enemy()
{
}
enemy.h 0 → 100644
//This is the enemy class, the home of the variable
#ifndef ENEMY_H
#define ENEMY_H
#include "ofMain.h"
class enemy
{
public:
enemy(float hp, float Level);
~enemy();
};
#endif
main.cpp 0 → 100644
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1280,720,OF_WINDOW); //Widescreen Resolution // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp(new ofApp());
}
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
ofSetBackgroundColor(125, 125, 125); //Setting up the program intitally
//HUD RELATED FUNCTIONS
//Item Box
ofSetColor(0);
ofRect(0,ofGetHeight()*0.75,ofGetWidth()/2, ofGetHeight()*0.25);
//Attack Box
ofSetColor(100,22,0);
ofRect(ofGetWidth() / 2, ofGetHeight()*0.75, ofGetWidth() / 2, ofGetHeight()*0.25);
//Text for boxes
ofDrawBitmapString("test", ofGetWidth()*0.25,ofGetHeight()*0.85);
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
}
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){
}
//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){
}
//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){
}
ofApp.h 0 → 100644
#pragma once
#include "ofMain.h"
#include "enemy.h"
#include <iostream>
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
enemy enemyTest{ 0,0 };
};
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