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.
|
|
|
#pragma once
|
|
|
|
#include "olcPixelGameEngine.h"
|
|
|
|
#include "Animation.h"
|
|
|
|
#include "olcUTIL_Animate2D.h"
|
|
|
|
#include "Monster.h"
|
|
|
|
|
|
|
|
struct Bullet{
|
|
|
|
vf2d pos;
|
|
|
|
vf2d vel;
|
|
|
|
float radius;
|
|
|
|
int damage;
|
|
|
|
Pixel col;
|
|
|
|
float lifetime=99999;
|
|
|
|
bool hitsMultiple=false;
|
|
|
|
bool rotates=false;
|
|
|
|
bool animated=false;
|
|
|
|
Animate2D::Animation<AnimationState>animation;
|
|
|
|
Animate2D::AnimationState internal_animState;
|
|
|
|
std::map<Monster*,bool>hitList;
|
|
|
|
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=999999,bool rotatesWithAngle=false,Pixel col=WHITE);
|
|
|
|
public:
|
|
|
|
Animate2D::Frame GetFrame();
|
|
|
|
void Draw();
|
|
|
|
};
|