adding event meachinsm for game items that change and sound support.
This commit is contained in:
parent
9ce106c179
commit
f49d07fdc5
15 changed files with 1468 additions and 43 deletions
21
game/state/events/explosion_event.hpp
Normal file
21
game/state/events/explosion_event.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "state/explosion.hpp"
|
||||
#include "state/state_update_event.hpp"
|
||||
|
||||
namespace game {
|
||||
class ExplosionEvent : public StateUpdateEvent {
|
||||
public:
|
||||
ExplosionEvent(StateUpdateEvent::LifeCycle lifeCycle, Explosion *explosion)
|
||||
: StateUpdateEvent(lifeCycle, StateUpdateEvent::EventType::Explosion)
|
||||
, explosion(explosion)
|
||||
|
||||
{
|
||||
std::string typeStr = StateUpdateEvent::lifeCycleToString(lifeCycle);
|
||||
std::cout<<"created explosion event for id " << explosion->id << " of type " << typeStr << std::endl;
|
||||
}
|
||||
|
||||
public:
|
||||
Explosion *explosion;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue