Forum_Deutsches_Museum_Inte.../src/checkedInVisitor.hpp
2019-07-23 09:59:48 +00:00

103 lines
2.3 KiB
C++

//
// checkedInVisitor.hpp
// Projekt_FORUM
//
// Created by Sebastian Holzki on 19.06.19.
//
#pragma once
#include "ofMain.h"
#include <stdio.h>
class CheckedInVisitor {
public:
CheckedInVisitor();
~CheckedInVisitor();
void setup(int playerType, int checkedInStele, float sceneWidth, float sceneHeight);
void update(float deltaT, float sceneWidth, float sceneHeight);
void draw();
void setupVelocity();
void setupPosition(int x, int y, int checkedInStele);
void setPosition(ofVec2f position);
ofVec2f getPosition();
ofVec2f getBottom();
void fillAttractingPixelsVector(float sceneWidth, float sceneHeight);
void pixelsWithValues(float sceneWidth, float sceneHeight, ofImage hexagon);
void updateAttractingPixels();
vector<ofVec2f>getPositionsOfAttractingPixels();
void setupCornerPositions(float sceneWidth, float sceneHeight);
void setStateOfSetup(bool setupFinished);
bool getStateOfSetup();
//Every CheckedInVisitor creates an Emitter for his starting Animation
//Following methods will help to not get any bad access errors when emitting
// from new attractors and not doing it from older ones
bool getIfEmitterIsDeleted();
void setIfEmitterIsDeleted(bool isDeleted);
void setPlayerType();
int getPlayerType();
void startingAnimation(float startingSpeed, float sceneWidth, float sceneHeight);
void move(float deltaT, float sceneWidth, float sceneHeight);
void aging(float deltaT);
float getAge();
void clipToLastCheckedInVisitor(CheckedInVisitor visitor); //A particular "image" can clip its position, depending on the position of the last
ofImage imageOfType;
ofImage hexagon;
vector<ofVec2f> attractingPixelsOfHexagon;
private:
int checkedInStele;
int playerType;
ofVec2f position;
ofVec2f positionLastFrame;
ofVec2f velocity;
float xVelocityMax;
bool started;
bool startedMovingToTheRight;
bool setupInOfAppIsFinished;
bool startingAnimationIsFinished;
bool emitterHasBeenDeleted;
//Random values between 0.0 and 1.0
float k1;
float k2;
float k3;
float age;
};