Skip to content

Commit

Permalink
bomber power up added
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhrack committed Jul 7, 2019
1 parent c6119e6 commit 4c34580
Show file tree
Hide file tree
Showing 29 changed files with 790 additions and 167 deletions.
9 changes: 9 additions & 0 deletions Arkanoid/Arkanoid.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
<ClInclude Include="BallBehaviorComponent.h" />
<ClInclude Include="BaseComponent.h" />
<ClInclude Include="BaseState.h" />
<ClInclude Include="NullTextureService.h" />
<ClInclude Include="PCTextureService.h" />
<ClInclude Include="PowerUpBomberComponent.h" />
<ClInclude Include="BoxColliderComponent.h" />
<ClInclude Include="BrickBehaviorComponent.h" />
<ClInclude Include="CircleColliderComponent.h" />
Expand All @@ -196,12 +199,17 @@
<ClInclude Include="ServiceLocator.h" />
<ClInclude Include="SpriteRenderComponent.h" />
<ClInclude Include="States.h" />
<ClInclude Include="TextureIDs.h" />
<ClInclude Include="TextureService.h" />
<ClInclude Include="TransformComponent.h" />
<ClInclude Include="World.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AudioService.cpp" />
<ClCompile Include="BallBehaviorComponent.cpp" />
<ClCompile Include="NullTextureService.cpp" />
<ClCompile Include="PCTextureService.cpp" />
<ClCompile Include="PowerUpBomberComponent.cpp" />
<ClCompile Include="BoxColliderComponent.cpp" />
<ClCompile Include="BrickBehaviorComponent.cpp" />
<ClCompile Include="CircleColliderComponent.cpp" />
Expand All @@ -226,6 +234,7 @@
<ClCompile Include="RenderComponent.cpp" />
<ClCompile Include="ServiceLocator.cpp" />
<ClCompile Include="SpriteRenderComponent.cpp" />
<ClCompile Include="TextureService.cpp" />
<ClCompile Include="TransformComponent.cpp" />
<ClCompile Include="World.cpp" />
</ItemGroup>
Expand Down
33 changes: 33 additions & 0 deletions Arkanoid/Arkanoid.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
<Filter Include="Source Files\Audio">
<UniqueIdentifier>{1654612d-e2f7-4d8a-92b0-aa25e908bc0b}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Textures">
<UniqueIdentifier>{28abb3a2-739e-4a92-9fed-d8bd8b87ebb1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Texture">
<UniqueIdentifier>{c0c2398e-3653-45a6-8880-d3ef03be4dcb}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="World.h">
Expand Down Expand Up @@ -162,6 +168,21 @@
<ClInclude Include="ServiceLocator.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PowerUpBomberComponent.h">
<Filter>Header Files\Components\PowerUps</Filter>
</ClInclude>
<ClInclude Include="TextureService.h">
<Filter>Header Files\Textures</Filter>
</ClInclude>
<ClInclude Include="TextureIDs.h">
<Filter>Header Files\Textures</Filter>
</ClInclude>
<ClInclude Include="PCTextureService.h">
<Filter>Header Files\Textures</Filter>
</ClInclude>
<ClInclude Include="NullTextureService.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="World.cpp">
Expand Down Expand Up @@ -248,6 +269,18 @@
<ClCompile Include="ServiceLocator.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PowerUpBomberComponent.cpp">
<Filter>Source Files\Components\PowerUps</Filter>
</ClCompile>
<ClCompile Include="TextureService.cpp">
<Filter>Source Files\Texture</Filter>
</ClCompile>
<ClCompile Include="PCTextureService.cpp">
<Filter>Source Files\Texture</Filter>
</ClCompile>
<ClCompile Include="NullTextureService.cpp">
<Filter>Source Files\Texture</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="resources\settings.json">
Expand Down
4 changes: 2 additions & 2 deletions Arkanoid/BallBehaviorComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ BallBehaviorComponent::BallBehaviorComponent(EntityID entityID, GameState* game,

mTransform->setPosition(pos);

sf::SoundBuffer* buffer = ServiceLocator::getAudio()->getSound(SoundID::BALL_HIT_WALL);
sf::SoundBuffer* buffer = ServiceLocator::getAudioService()->getSound(SoundID::BALL_HIT_WALL);
mHitSound.setBuffer(*buffer);

buffer = ServiceLocator::getAudio()->getSound(SoundID::BALL_HIT_BRICK);
buffer = ServiceLocator::getAudioService()->getSound(SoundID::BALL_HIT_BRICK);
mHitBrickSound.setBuffer(*buffer);
}

Expand Down
2 changes: 2 additions & 0 deletions Arkanoid/ComponentList.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ enum CompType {
CIRCLE_COLLIDER,

STICKY,
DISRUPTION,
BOMBER,

GAME_OVER_WATCHER,

Expand Down
2 changes: 1 addition & 1 deletion Arkanoid/GameOverWatcherComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GameOverWatcherComponent::GameOverWatcherComponent(EntityID entityID, GameState*
auto bricks = mGame->getAllEntitiesByType(EntityType::TAG_BRICK);
mNumBricks = (int)bricks.size();

sf::SoundBuffer* buffer = ServiceLocator::getAudio()->getSound(SoundID::BALL_LOST);
sf::SoundBuffer* buffer = ServiceLocator::getAudioService()->getSound(SoundID::BALL_LOST);
mLostBallSound.setBuffer(*buffer);
}

Expand Down
Loading

0 comments on commit 4c34580

Please sign in to comment.