generated from sigonasr2/CPlusPlusProjectTemplate
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>master
parent
fe96cb8df0
commit
95a110808c
@ -0,0 +1,13 @@ |
||||
#include "gameDefines.h" |
||||
|
||||
std::vector<Block>&BlockClump::getBlocks(){ |
||||
return blocks; |
||||
} |
||||
|
||||
void BlockClump::addBlock(int col){ |
||||
blocks.push_back(Block({(float)col*12,0})); |
||||
} |
||||
|
||||
vf2d BlockClump::getBlockPosition(Block&b){ |
||||
return {b.pos.x,b.pos.y+y}; |
||||
} |
@ -0,0 +1,19 @@ |
||||
#ifndef BLOCKCLUMP_H |
||||
#define BLOCKCLUMP_H |
||||
#include "pixelGameEngine.h" |
||||
|
||||
class Block; |
||||
|
||||
class BlockClump{ |
||||
std::vector<Block>blocks; |
||||
public: |
||||
float vspeed=0; |
||||
float landTime=0.f; |
||||
float y=0; |
||||
BlockClump(){} |
||||
std::vector<Block>&getBlocks(); |
||||
void addBlock(int col); |
||||
//Get a block's position relative to this block clump.
|
||||
vf2d getBlockPosition(Block&b); |
||||
}; |
||||
#endif |
Binary file not shown.
@ -0,0 +1,4 @@ |
||||
#include "pixelGameEngine.h" |
||||
#include "Meteos.h" |
||||
#include "BlockClump.h" |
||||
#include "Block.h" |
Loading…
Reference in new issue