diff --git a/Radio Wave.zip b/Radio Wave.zip new file mode 100644 index 0000000..a04f686 Binary files /dev/null and b/Radio Wave.zip differ diff --git a/VaporWaveWars/actor.cpp b/VaporWaveWars/actor.cpp index 0237a9c..6dc7350 100644 --- a/VaporWaveWars/actor.cpp +++ b/VaporWaveWars/actor.cpp @@ -35,8 +35,8 @@ bool Actor::update(float deltaTime, sf::RenderWindow *window) { bool Actor::hitBy(Compas enemy) { bool dodge = enemy == compas; - if (dodge) std::cout << "dodge" << std::endl; - else std::cout << "hit" << std::endl; + /*if (dodge) //std::cout << "dodge" << std::endl; + else //std::cout << "hit" << std::endl;*/ if (!dodge) { character->setState(PlayerState::hurt); animate = PlayerState::inMidle; diff --git a/VaporWaveWars/button.cpp b/VaporWaveWars/button.cpp index 076ec51..79272da 100644 --- a/VaporWaveWars/button.cpp +++ b/VaporWaveWars/button.cpp @@ -25,7 +25,7 @@ int Button::getClicks(){ int c = _clicks; //cout << "popping clicks " << c << endl; _clicks = 0; - //if (_clicks > 0) std::cout << "popclicks = " << _clicks << std::endl; + //if (_clicks > 0) //std::cout << "popclicks = " << _clicks << std::endl; return c; } @@ -51,14 +51,14 @@ void Button::handleMouseEvent(sf::Event& event){ switch (event.type){ case (sf::Event::MouseButtonPressed): if(_state == ButtonState::active) _state = ButtonState::pressed; - //std::cout << "pressed!" << _clicks << std::endl; + ////std::cout << "pressed!" << _clicks << std::endl; break; case (sf::Event::MouseButtonReleased): if(_state == ButtonState::pressed){ _state = ButtonState::active; ++_clicks; - //std::cout << "released!" << _clicks << std::endl; + ////std::cout << "released!" << _clicks << std::endl; } break; diff --git a/VaporWaveWars/character.cpp b/VaporWaveWars/character.cpp index f32807c..9b7256a 100644 --- a/VaporWaveWars/character.cpp +++ b/VaporWaveWars/character.cpp @@ -54,26 +54,26 @@ void Character::setState(PlayerState::playerState state){ SoundManager::setVolume(100,sample); SoundManager::playSound(sample); - //std::cout << "playing sample " << sample << std::endl; + ////std::cout << "playing sample " << sample << std::endl; } else if (state == PlayerState::hurt){ - //std::cout << "i am hurt" << std::endl; + ////std::cout << "i am hurt" << std::endl; indexX = 0; indexY = 2 + magicNumber; std::string sample = "fail"+std::to_string(rand()%6+1); SoundManager::setVolume(100,sample); SoundManager::playSound(sample); - //std::cout << "playing sample " << sample << std::endl; + ////std::cout << "playing sample " << sample << std::endl; } else if (state == PlayerState::success){ - //std::cout << "i am succeed!" << std::endl; + ////std::cout << "i am succeed!" << std::endl; indexX = 0; indexY = 3 + magicNumber; std::string sample = "bona"+std::to_string(rand()%8+1); SoundManager::setVolume(10,sample); SoundManager::playSound(sample); - std::cout << "playing sample " << sample << std::endl; + //std::cout << "playing sample " << sample << std::endl; } } diff --git a/VaporWaveWars/combat.cpp b/VaporWaveWars/combat.cpp index da8991c..0ee67ce 100644 --- a/VaporWaveWars/combat.cpp +++ b/VaporWaveWars/combat.cpp @@ -210,7 +210,7 @@ void Combat::enemyManager(bool compasFinish) { //To do: considerar si hay ia } void Combat::doMahWaves(bool p) { - std::cout << "defensa jugador " << p << std::endl; + //std::cout << "defensa jugador " << p << std::endl; std::vector notes; if(p){ notes = player->getAttack().getNotes(); @@ -221,7 +221,7 @@ void Combat::doMahWaves(bool p) { if(!p) anterior = 256+256*anterior; else anterior = 768-256*anterior; for(int i = 0; i < notes.size(); ++i){ - std::cout << notes[i] << std::endl; + //std::cout << notes[i] << std::endl; Wave* w = new Wave(p); //if(!p) w->setPosition(anterior,500); //else w->setPosition(512-512*anterior,500); @@ -237,7 +237,7 @@ void Combat::doMahWaves(bool p) { // if(!p) anterior = 512+256*anterior; // else anterior = 512-256*anterior; // for(int i = 0; i < 20; ++i){ -// //std::cout << 0 << std::endl; +// ////std::cout << 0 << std::endl; // Wave* w = new Wave(p); // //if(!p) w->setPosition(anterior,500); // //else w->setPosition(512-512*anterior,500); diff --git a/VaporWaveWars/compas.cpp b/VaporWaveWars/compas.cpp index 44ab01d..cbd9b43 100644 --- a/VaporWaveWars/compas.cpp +++ b/VaporWaveWars/compas.cpp @@ -9,7 +9,7 @@ Compas::Compas() { void Compas::start() { failed = false; if (not isPress) { -// std::cout << "start" << std::endl; +// //std::cout << "start" << std::endl; isPress = true; spaceTime = 1; notes = std::vector(); @@ -20,16 +20,16 @@ void Compas::add() { if (isPress) { notes.push_back(spaceTime); spaceTime = 1; -// std::cout << "add" << std::endl; +// //std::cout << "add" << std::endl; } } void Compas::end() { if (isPress) { isPress = false; -// std::cout << "end" << std::endl; +// //std::cout << "end" << std::endl; // for (int i = 0; i < notes.size(); ++i) { -// std::cout << notes[i] << std::endl; +// //std::cout << notes[i] << std::endl; // } } } diff --git a/VaporWaveWars/game.cpp b/VaporWaveWars/game.cpp index e6622e8..9c04a9b 100644 --- a/VaporWaveWars/game.cpp +++ b/VaporWaveWars/game.cpp @@ -28,7 +28,7 @@ void Game::run() { float time = c.getElapsedTime().asSeconds(); float deltaTime = time-oldTime; oldTime = time; - //std::cout << deltaTime << std::endl; + ////std::cout << deltaTime << std::endl; update(deltaTime, &window); draw( &window); } diff --git a/VaporWaveWars/menu.cpp b/VaporWaveWars/menu.cpp index df277fe..aabd2d1 100644 --- a/VaporWaveWars/menu.cpp +++ b/VaporWaveWars/menu.cpp @@ -17,7 +17,7 @@ Menu::Menu() { void Menu::update(float deltaTime, sf::RenderWindow*window){ //float dx = InputManager::action(InputAction::moveX0); //_buttons[0]->move(dx,0); - //std::cout << dx << std::endl; + ////std::cout << dx << std::endl; for(unsigned int i = 0; i < _buttons.size(); ++i){ _buttons[i]->update(window->mapPixelToCoords(sf::Vector2i(sf::Mouse::getPosition(*window)))); } @@ -31,14 +31,14 @@ void Menu::draw(sf::RenderWindow* window){ } void Menu::updateEvents(sf::Event e){ -// std::cout << "update menu buttons" << std::endl; +// //std::cout << "update menu buttons" << std::endl; for(unsigned int i = 0; i < _buttons.size(); ++i){ _buttons[i]->handleMouseEvent(e); } MyGame* g = static_cast(Game::i()); if (_start.getClicks() > 0){ g->changeScene(GameScene::inGame); - std::cout << "Game not ready to be played. Please Wait." << std::endl; + //std::cout << "Game not ready to be played. Please Wait." << std::endl; } else if(_exit.getClicks() > 0) g->isRunning = false; diff --git a/VaporWaveWars/mygame.cpp b/VaporWaveWars/mygame.cpp index 9884ce7..894df04 100644 --- a/VaporWaveWars/mygame.cpp +++ b/VaporWaveWars/mygame.cpp @@ -8,7 +8,7 @@ MyGame::MyGame() { _scenes[GameScene::inGame] = _combat; _scenes[GameScene::help] = _menu; _scenes[GameScene::credits] = _menu; - std::cout << "in menu" << std::endl; + //std::cout << "in menu" << std::endl; SoundManager::load(); SoundManager::setLoop(true, "intro"); SoundManager::playMusic("intro"); @@ -38,7 +38,7 @@ void MyGame::changeScene(GameScene::gameScene n){ // Main game loop void MyGame::update(float deltaTime, sf::RenderWindow*window) { - // std::cout << deltaTime << std::endl; + // //std::cout << deltaTime << std::endl; sf::Event event; while(window->pollEvent(event)){ switch (event.type) { @@ -56,7 +56,7 @@ void MyGame::update(float deltaTime, sf::RenderWindow*window) { switch(_scene){ case(GameScene::menu): - //std::cout << "still in menu" << std::endl; + ////std::cout << "still in menu" << std::endl; break; default: break; diff --git a/VaporWaveWars/player.cpp b/VaporWaveWars/player.cpp index 778855e..6fd4a12 100644 --- a/VaporWaveWars/player.cpp +++ b/VaporWaveWars/player.cpp @@ -35,7 +35,7 @@ bool Player::event(sf::Event e) { std::string sample = "mod"+std::to_string(rand()%2+1); if(!mod) sample = "note"+std::to_string(rand()%4+1); SoundManager::playSound(sample); - std::cout << "playing sample " << sample << std::endl; + //std::cout << "playing sample " << sample << std::endl; compas.start(); error = false; }