This repository has been archived on 2022-12-14. You can view files and clone it, but cannot push or open issues or pull requests.
WaveGGJ17/VaporWaveWars/wave.cpp
marti.lloveras 71d87ed23c suicide
2017-01-21 18:30:37 +01:00

22 lines
456 B
C++

#include "wave.hpp"
Wave::Wave(bool dir){
direction = dir;
ASSERT(texture.loadFromFile(spriteFile));
setTexture(texture);
sf::IntRect rect = sf::IntRect(0, 0, texture.getSize().x, texture.getSize().y);
setTextureRect(rect);
}
void Wave::update(float deltaTime){
float pos = getPosition().x;
if (direction){
pos += 0; // AMOUNT??
}
else{
pos -= 0; // ""
}
setPosition(pos, getPosition().y);
}