-
Notifications
You must be signed in to change notification settings - Fork 0
/
WarpEffect.h
62 lines (42 loc) · 855 Bytes
/
WarpEffect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef _WarpEffect
#define _WarpEffect
#if _WIN32
#include <windows.h>
#endif
#include <iostream>
#include <cstdlib>
#include <GL/gl.h>
//#include <SDL/SDL.h>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <math.h>
#include <time.h>
#include "consts.h"
class WarpEffect{
float x;
float y;
float age;
int opacity;
float radius;
int maxAge;
int halfLife;
float deltaTime;
float lastTime;
bool active;
sf::Clock* Clock;
public:
// WarpEffect();
WarpEffect();
WarpEffect(float intX, float intY);
//use either setAge or setHalfLife
//two ways to set length of effect
void setAge(int);
void setHalfLife(int);
void draw(float mX, float mY);
// void incAge(Uint32 deltaTime);
void incAge();
void initiate(float intX, float intY, int inHalfLife);
float getX();
float getY();
};
#endif