Added Component to bricks to emitt sound. Improved code for playing a sound
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Created by Adam on 2015-09-17.
|
||||
//
|
||||
|
||||
#ifndef COMPONENTS_CCOLLISIONSOUND_H__
|
||||
#define COMPONENTS_CCOLLISIONSOUND_H__
|
||||
|
||||
#include "Core/Component.h"
|
||||
|
||||
namespace dd
|
||||
{
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct CollisionSound : public Component
|
||||
{
|
||||
std::string filePath;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -28,9 +28,11 @@
|
||||
#include "Sound/EPlaySFX.h"
|
||||
#include "Physics/EContact.h"
|
||||
#include "Core/EventBroker.h"
|
||||
#include <Game/CBall.h>
|
||||
#include <Game/CBrick.h>
|
||||
#include <Game/CPad.h>
|
||||
#include "Game/CBall.h"
|
||||
#include "Game/CBrick.h"
|
||||
#include "Game/CPad.h"
|
||||
#include "Sound/CCollisionSound.h"
|
||||
|
||||
|
||||
namespace dd
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user