suicide
This commit is contained in:
parent
dd656cbc60
commit
71d87ed23c
4 changed files with 18 additions and 8 deletions
|
@ -3,16 +3,18 @@
|
||||||
Wave::Wave(bool dir){
|
Wave::Wave(bool dir){
|
||||||
direction = dir;
|
direction = dir;
|
||||||
ASSERT(texture.loadFromFile(spriteFile));
|
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){
|
void Wave::update(float deltaTime){
|
||||||
timestamp += deltaTime;
|
|
||||||
float pos = getPosition().x;
|
float pos = getPosition().x;
|
||||||
if (direction){
|
if (direction){
|
||||||
pos += ; // AMOUNT??
|
pos += 0; // AMOUNT??
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
pos -= ; // ""
|
pos -= 0; // ""
|
||||||
}
|
}
|
||||||
setPosition(pos, getPosition().y);
|
setPosition(pos, getPosition().y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ private:
|
||||||
bool direction; //TRUE => CAP A LA DRETA
|
bool direction; //TRUE => CAP A LA DRETA
|
||||||
|
|
||||||
sf::Texture texture;
|
sf::Texture texture;
|
||||||
float timestamp;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Wave();
|
Wave();
|
||||||
|
|
|
@ -61,7 +61,8 @@ SOURCES = ../VaporWaveWars/main.cpp \
|
||||||
../VaporWaveWars/iaenemy.cpp \
|
../VaporWaveWars/iaenemy.cpp \
|
||||||
../VaporWaveWars/actor.cpp \
|
../VaporWaveWars/actor.cpp \
|
||||||
../VaporWaveWars/soundmanager.cpp \
|
../VaporWaveWars/soundmanager.cpp \
|
||||||
../VaporWaveWars/score.cpp
|
../VaporWaveWars/score.cpp \
|
||||||
|
../VaporWaveWars/wave.cpp
|
||||||
OBJECTS = main.o \
|
OBJECTS = main.o \
|
||||||
game.o \
|
game.o \
|
||||||
mygame.o \
|
mygame.o \
|
||||||
|
@ -75,7 +76,8 @@ OBJECTS = main.o \
|
||||||
iaenemy.o \
|
iaenemy.o \
|
||||||
actor.o \
|
actor.o \
|
||||||
soundmanager.o \
|
soundmanager.o \
|
||||||
score.o
|
score.o \
|
||||||
|
wave.o
|
||||||
DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \
|
DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \
|
||||||
../../../Qt/5.7/gcc_64/mkspecs/common/unix.conf \
|
../../../Qt/5.7/gcc_64/mkspecs/common/unix.conf \
|
||||||
../../../Qt/5.7/gcc_64/mkspecs/common/linux.conf \
|
../../../Qt/5.7/gcc_64/mkspecs/common/linux.conf \
|
||||||
|
@ -232,7 +234,8 @@ DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \
|
||||||
iaenemy.hpp \
|
iaenemy.hpp \
|
||||||
actor.hpp \
|
actor.hpp \
|
||||||
soundmanager.hpp \
|
soundmanager.hpp \
|
||||||
score.hpp ../VaporWaveWars/main.cpp \
|
score.hpp \
|
||||||
|
wave.hpp ../VaporWaveWars/main.cpp \
|
||||||
../VaporWaveWars/game.cpp \
|
../VaporWaveWars/game.cpp \
|
||||||
../VaporWaveWars/mygame.cpp \
|
../VaporWaveWars/mygame.cpp \
|
||||||
../VaporWaveWars/button.cpp \
|
../VaporWaveWars/button.cpp \
|
||||||
|
@ -245,7 +248,8 @@ DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \
|
||||||
../VaporWaveWars/iaenemy.cpp \
|
../VaporWaveWars/iaenemy.cpp \
|
||||||
../VaporWaveWars/actor.cpp \
|
../VaporWaveWars/actor.cpp \
|
||||||
../VaporWaveWars/soundmanager.cpp \
|
../VaporWaveWars/soundmanager.cpp \
|
||||||
../VaporWaveWars/score.cpp
|
../VaporWaveWars/score.cpp \
|
||||||
|
../VaporWaveWars/wave.cpp
|
||||||
QMAKE_TARGET = VaporWaveWars
|
QMAKE_TARGET = VaporWaveWars
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
TARGET = VaporWaveWars
|
TARGET = VaporWaveWars
|
||||||
|
@ -708,6 +712,11 @@ score.o: ../VaporWaveWars/score.cpp ../VaporWaveWars/score.hpp \
|
||||||
../VaporWaveWars/soundmanager.hpp
|
../VaporWaveWars/soundmanager.hpp
|
||||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o score.o ../VaporWaveWars/score.cpp
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o score.o ../VaporWaveWars/score.cpp
|
||||||
|
|
||||||
|
wave.o: ../VaporWaveWars/wave.cpp ../VaporWaveWars/wave.hpp \
|
||||||
|
../VaporWaveWars/commons.hpp \
|
||||||
|
../VaporWaveWars/soundmanager.hpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o wave.o ../VaporWaveWars/wave.cpp
|
||||||
|
|
||||||
####### Install
|
####### Install
|
||||||
|
|
||||||
install: FORCE
|
install: FORCE
|
||||||
|
|
Binary file not shown.
Reference in a new issue