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.
30 lines
843 B
30 lines
843 B
#pragma once
|
|
#include "olcPixelGameEngine.h"
|
|
#include "Animation.h"
|
|
#include "olcUTIL_Animate2D.h"
|
|
#include "Monster.h"
|
|
|
|
#define INFINITE 999999
|
|
|
|
struct Bullet{
|
|
vf2d pos;
|
|
vf2d vel;
|
|
float radius;
|
|
int damage;
|
|
Pixel col;
|
|
float lifetime=INFINITE;
|
|
bool hitsMultiple=false;
|
|
bool rotates=false;
|
|
bool animated=false;
|
|
Animate2D::Animation<AnimationState>animation;
|
|
Animate2D::AnimationState internal_animState;
|
|
std::map<Monster*,bool>hitList;
|
|
float lastParticleSpawn=0;
|
|
Bullet(vf2d pos,vf2d vel,float radius,int damage,Pixel col=WHITE);
|
|
//Initializes a bullet with an animation.
|
|
Bullet(vf2d pos,vf2d vel,float radius,int damage,AnimationState animation,bool hitsMultiple=false,float lifetime=INFINITE,bool rotatesWithAngle=false,Pixel col=WHITE);
|
|
public:
|
|
void Update(float fElapsedTime);
|
|
Animate2D::Frame GetFrame();
|
|
void Draw();
|
|
}; |