The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'!
https://forums.lestoria.net
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.7 KiB
45 lines
1.7 KiB
#pragma once
|
|
#include "olcPixelGameEngine.h"
|
|
#include "Animation.h"
|
|
#include "olcUTIL_Animate2D.h"
|
|
|
|
struct Effect{
|
|
vf2d pos={0,0};
|
|
float lifetime=0;
|
|
float fadeout=0;
|
|
vf2d size={1,1};
|
|
Pixel col=WHITE;
|
|
vf2d spd={};
|
|
float rotation=0;
|
|
float rotationSpd=0;
|
|
bool additiveBlending=false;
|
|
Effect(vf2d pos,float lifetime,AnimationState animation,bool upperLevel,float size=1.0f,float fadeout=0.0f,vf2d spd={},Pixel col=WHITE,float rotation=0,float rotationSpd=0,bool additiveBlending=false);
|
|
Effect(vf2d pos,float lifetime,AnimationState animation,bool upperLevel,vf2d size={1,1},float fadeout=0.0f,vf2d spd={},Pixel col=WHITE,float rotation=0,float rotationSpd=0,bool additiveBlending=false);
|
|
virtual bool Update(float fElapsedTime);
|
|
Animate2D::Frame GetFrame();
|
|
virtual void Draw();
|
|
bool OnUpperLevel();
|
|
protected:
|
|
float original_fadeoutTime;
|
|
private:
|
|
Animate2D::Animation<AnimationState>animation;
|
|
Animate2D::AnimationState internal_animState;
|
|
bool upperLevel=false;
|
|
};
|
|
|
|
struct Meteor:Effect{
|
|
Meteor(vf2d pos,float lifetime,AnimationState animation,bool upperLevel,vf2d size={1,1},float fadeout=0.0f,vf2d spd={},Pixel col=WHITE,float rotation=0,float rotationSpd=0,bool additiveBlending=false);
|
|
float startLifetime=0;
|
|
bool shakeField=false;
|
|
bool Update(float fElapsedTime)override;
|
|
void Draw()override;
|
|
};
|
|
|
|
struct PulsatingFire:Effect{
|
|
PulsatingFire(vf2d pos,float lifetime,AnimationState animation,bool upperLevel,vf2d size={1,1},float fadeout=0.0f,vf2d spd={},Pixel col=WHITE,float rotation=0,float rotationSpd=0,bool additiveBlending=false);
|
|
std::vector<float>pulsatingFireValues;
|
|
float lastParticleTimer=0;
|
|
float lastDamageTimer=0;
|
|
bool Update(float fElapsedTime)override;
|
|
void Draw()override;
|
|
}; |