Dateien hochladen nach „“
This commit is contained in:
parent
8c167b27a0
commit
fc3f1be555
38
Emitter.hpp
Normal file
38
Emitter.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// Emitter.hpp
|
||||
// emptyExample
|
||||
//
|
||||
// Created by Sebastian Holzki on 17.04.19.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include "ofMain.h"
|
||||
|
||||
|
||||
class Emitter {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Emitter();
|
||||
~Emitter();
|
||||
|
||||
|
||||
void setEmitterPosition(ofVec2f _position);
|
||||
ofVec2f getEmitterPosition();
|
||||
|
||||
int getEmitterX();
|
||||
int getEmitterY();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool emitting;
|
||||
void emitParticles(ofVec2f _positionOfEmission, bool _emitting);
|
||||
|
||||
ofVec2f direction;
|
||||
ofVec2f position;
|
||||
|
||||
|
||||
};
|
99
avatar.cpp
Normal file
99
avatar.cpp
Normal file
@ -0,0 +1,99 @@
|
||||
//
|
||||
// avatar.cpp
|
||||
// emptyExample
|
||||
//
|
||||
// Created by Sebastian Holzki on 17.04.19.
|
||||
//
|
||||
|
||||
#include "avatar.hpp"
|
||||
|
||||
|
||||
|
||||
Avatar::Avatar(int playerType){
|
||||
|
||||
setup(playerType);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
|
||||
Avatar::~Avatar(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
|
||||
void Avatar::setup(int playerType){
|
||||
|
||||
//Load the right icon from data in ofImage, by using the transmitted info about the playerType
|
||||
|
||||
// --> icon = ....
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
|
||||
void Avatar::update(){
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
void Avatar::draw(){
|
||||
|
||||
icon.draw(position);
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
ofVec2f Avatar::getPosition(){
|
||||
|
||||
return position;
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
void Avatar::setPosition(int _x, int _y){
|
||||
|
||||
position.x = _x;
|
||||
position.y = _y;
|
||||
|
||||
}
|
||||
|
||||
void Avatar::setPosition(ofVec2f _position){
|
||||
|
||||
position = _position;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
void Avatar::clipToAvatar(Avatar _avatar){
|
||||
|
||||
//Read coordinates to clip to:
|
||||
ofVec2f tempCoords = _avatar.getPosition();
|
||||
|
||||
if( tempCoords.y == 0 ){
|
||||
|
||||
position.x = tempCoords.x + 20 ;
|
||||
position.y = tempCoords.y + 20 ;
|
||||
|
||||
}else{
|
||||
|
||||
position.x = tempCoords.x + 20 ;
|
||||
position.y = tempCoords.y - 20 ;
|
||||
|
||||
}
|
||||
|
||||
}
|
51
avatar.hpp
Normal file
51
avatar.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
//
|
||||
// avatar.hpp
|
||||
// emptyExample
|
||||
//
|
||||
// Created by Sebastian Holzki on 17.04.19.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include <stdio.h>
|
||||
#include "ofMain.h"
|
||||
|
||||
|
||||
|
||||
|
||||
class Avatar {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Avatar(int playerType);
|
||||
~Avatar();
|
||||
|
||||
void setup(int playerType);
|
||||
// void update();
|
||||
void draw();
|
||||
|
||||
void setPlayerType();
|
||||
int getPlayerType();
|
||||
|
||||
ofVec2f getPosition();
|
||||
void setPosition(int x, int y);
|
||||
void setPosition(ofVec2f position);
|
||||
|
||||
|
||||
void clipToAvatar(Avatar avatar); //A particular avatar can clip its position, depending on the position of another avatar, compared to a beehive-structure)
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
ofImage icon;
|
||||
int playerType;
|
||||
ofVec2f position;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
80
greatWhole.cpp
Normal file
80
greatWhole.cpp
Normal file
@ -0,0 +1,80 @@
|
||||
//
|
||||
// greatWhole.cpp
|
||||
// emptyExample
|
||||
//
|
||||
// Created by Sebastian Holzki on 17.04.19.
|
||||
//
|
||||
|
||||
#include "greatWhole.hpp"
|
||||
//#include "main.h"
|
||||
|
||||
|
||||
|
||||
|
||||
GreatWhole::GreatWhole()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
GreatWhole::~GreatWhole()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
|
||||
void GreatWhole::setup(){
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
void GreatWhole::update(vector<Avatar*> avatars){
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
void GreatWhole::draw(){
|
||||
|
||||
/*
|
||||
|
||||
draw the whole avatar vector
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
void GreatWhole::addAvatar(Avatar avatar){
|
||||
|
||||
|
||||
avatars.push_back(avatar);
|
||||
|
||||
/*
|
||||
|
||||
Set coordinates in abhängigkeit vom letzten also bei avatars at (max-1)
|
||||
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
75
particleSystem.cpp
Normal file
75
particleSystem.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
//
|
||||
// particleSystem.cpp
|
||||
// emptyExample
|
||||
//
|
||||
// Created by Sebastian Holzki on 16.04.19.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include "particleSystem.hpp"
|
||||
|
||||
|
||||
|
||||
ParticleSystem::ParticleSystem(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
ParticleSystem::~ParticleSystem(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
|
||||
void ParticleSystem::setup(){
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
void ParticleSystem::update(float deltaT, int visitorID, bool attracted){
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
- wenn attracted, dann springe in Berechnung der Attraktion durch die vorhandenen Attraktoren
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
VisitorID stellt bekannten Besucher dar, also fertiges, auswertbares Profil.
|
||||
visitorID steuert die Optik des Partikelsystems, aktiviert also eine Art Preset
|
||||
z.B. Switch-Anweisung (visitorID 1-8):
|
||||
|
||||
case 0: default mode, attraction
|
||||
case 1: load xml blabla1
|
||||
case 2: load xml blabla2
|
||||
...
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
|
||||
|
||||
void ParticleSystem::draw(){
|
||||
|
||||
/*
|
||||
|
||||
draw all the particles from the vector in the ParticleSystem
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user