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.
|
|
|
#ifndef BLOCKCLUMP_H
|
|
|
|
#define BLOCKCLUMP_H
|
|
|
|
#include "pixelGameEngine.h"
|
|
|
|
|
|
|
|
class Block;
|
|
|
|
enum class BlockColor;
|
|
|
|
|
|
|
|
class BlockClump{
|
|
|
|
std::vector<Block>blocks;
|
|
|
|
public:
|
|
|
|
float vspeed=0;
|
|
|
|
float landTime=0.f;
|
|
|
|
float launchTime=0.f;
|
|
|
|
int combo=0;
|
|
|
|
float y=0;
|
|
|
|
bool flinged=false;
|
|
|
|
BlockClump();
|
|
|
|
std::vector<Block>&getBlocks();
|
|
|
|
void addBlock(int col,BlockColor color);
|
|
|
|
void addBlock(int col,int row,BlockColor color);
|
|
|
|
void addBlock(vf2d offset,BlockColor color);
|
|
|
|
void addBlockOnTopOf(int col,BlockColor color,int defaultY);
|
|
|
|
//Get a block's position relative to this block clump.
|
|
|
|
vf2d getBlockPosition(Block&b);
|
|
|
|
void sortBlocks();
|
|
|
|
void removeBlock(int i);
|
|
|
|
};
|
|
|
|
#endif
|