diff --git a/VaporWaveWars/wave.cpp b/VaporWaveWars/wave.cpp index 7ebd5a9..6a18d8a 100644 --- a/VaporWaveWars/wave.cpp +++ b/VaporWaveWars/wave.cpp @@ -3,16 +3,18 @@ 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){ - timestamp += deltaTime; float pos = getPosition().x; if (direction){ - pos += ; // AMOUNT?? + pos += 0; // AMOUNT?? } else{ - pos -= ; // "" + pos -= 0; // "" } setPosition(pos, getPosition().y); } diff --git a/VaporWaveWars/wave.hpp b/VaporWaveWars/wave.hpp index f9625e3..c304d47 100644 --- a/VaporWaveWars/wave.hpp +++ b/VaporWaveWars/wave.hpp @@ -15,7 +15,6 @@ private: bool direction; //TRUE => CAP A LA DRETA sf::Texture texture; - float timestamp; public: Wave(); diff --git a/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/Makefile b/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/Makefile index 05e7e85..8ee97a4 100644 --- a/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/Makefile +++ b/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/Makefile @@ -61,7 +61,8 @@ SOURCES = ../VaporWaveWars/main.cpp \ ../VaporWaveWars/iaenemy.cpp \ ../VaporWaveWars/actor.cpp \ ../VaporWaveWars/soundmanager.cpp \ - ../VaporWaveWars/score.cpp + ../VaporWaveWars/score.cpp \ + ../VaporWaveWars/wave.cpp OBJECTS = main.o \ game.o \ mygame.o \ @@ -75,7 +76,8 @@ OBJECTS = main.o \ iaenemy.o \ actor.o \ soundmanager.o \ - score.o + score.o \ + wave.o 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/linux.conf \ @@ -232,7 +234,8 @@ DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \ iaenemy.hpp \ actor.hpp \ soundmanager.hpp \ - score.hpp ../VaporWaveWars/main.cpp \ + score.hpp \ + wave.hpp ../VaporWaveWars/main.cpp \ ../VaporWaveWars/game.cpp \ ../VaporWaveWars/mygame.cpp \ ../VaporWaveWars/button.cpp \ @@ -245,7 +248,8 @@ DIST = ../../../Qt/5.7/gcc_64/mkspecs/features/spec_pre.prf \ ../VaporWaveWars/iaenemy.cpp \ ../VaporWaveWars/actor.cpp \ ../VaporWaveWars/soundmanager.cpp \ - ../VaporWaveWars/score.cpp + ../VaporWaveWars/score.cpp \ + ../VaporWaveWars/wave.cpp QMAKE_TARGET = VaporWaveWars DESTDIR = TARGET = VaporWaveWars @@ -708,6 +712,11 @@ score.o: ../VaporWaveWars/score.cpp ../VaporWaveWars/score.hpp \ ../VaporWaveWars/soundmanager.hpp $(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: FORCE diff --git a/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/VaporWaveWars b/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/VaporWaveWars index d8fed3b..b827d7e 100755 Binary files a/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/VaporWaveWars and b/build-VaporWaveWars-Desktop_Qt_5_7_0_GCC_64bit-Debug/VaporWaveWars differ