1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Add event manager and use it to trigger sounds

This commit is contained in:
Perttu Ahola 2012-03-23 20:23:03 +02:00
parent e53794868e
commit 6c14025b2d
15 changed files with 388 additions and 14 deletions

View file

@ -28,6 +28,7 @@ class INodeDefManager;
class ICraftDefManager;
class ITextureSource;
class ISoundManager;
class MtEventManager;
/*
An interface for fetching game-global definitions like tool and
@ -47,17 +48,19 @@ public:
// pointers in other threads than main thread will make things explode.
virtual ITextureSource* getTextureSource()=0;
virtual ISoundManager* getSoundManager()=0;
// Used for keeping track of names/ids of unknown nodes
virtual u16 allocateUnknownNodeId(const std::string &name)=0;
virtual ISoundManager* getSoundManager()=0;
virtual MtEventManager* getEventManager()=0;
// Shorthands
IItemDefManager* idef(){return getItemDefManager();}
INodeDefManager* ndef(){return getNodeDefManager();}
ICraftDefManager* cdef(){return getCraftDefManager();}
ITextureSource* tsrc(){return getTextureSource();}
ISoundManager* sound(){return getSoundManager();}
MtEventManager* event(){return getEventManager();}
};
#endif