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:
parent
e53794868e
commit
6c14025b2d
15 changed files with 388 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue