2010-04-05 23:38:59 +02:00
|
|
|
#ifndef _MODELGLOBAL_H
|
|
|
|
#define _MODELGLOBAL_H
|
|
|
|
|
|
|
|
namespace Engine {
|
2011-01-02 18:25:20 +01:00
|
|
|
class EntityBase;
|
2010-04-05 23:38:59 +02:00
|
|
|
|
|
|
|
/** \brief Adds the function callback as command for the given name*/
|
|
|
|
unsigned int GetPlayerEntityId ();
|
2011-01-02 18:25:20 +01:00
|
|
|
|
|
|
|
/** \brief Returns the entity at the given world coordinates or NULL */
|
|
|
|
EntityBase* GetEntityAt(const vector3d &pos);
|
|
|
|
|
2010-11-28 00:20:58 +01:00
|
|
|
/** \brief Assigns the player to an Entity. All controls will be redirected to that player
|
|
|
|
*
|
|
|
|
* This can be used to disable the controls of of the player by assinging
|
|
|
|
* the special entity id of NullEntityId */
|
|
|
|
void SetPlayerEntityId(unsigned int entity_id);
|
2010-04-05 23:38:59 +02:00
|
|
|
|
|
|
|
/** \brief Returns the duration of the frame in seconds */
|
|
|
|
float GetFrameDuration ();
|
|
|
|
|
2011-03-15 10:21:26 +01:00
|
|
|
/** \brief Returns the number of seconds the application is running
|
|
|
|
*
|
|
|
|
* \todo [low] rename GetTimeApplicationStart to a proper name!
|
|
|
|
*/
|
|
|
|
float GetDurationApplicationStart ();
|
|
|
|
|
2010-11-27 20:56:38 +01:00
|
|
|
// /** \brief Starts a timer with the given id that expires after sec seconds */
|
2011-03-22 23:01:44 +01:00
|
|
|
void StartTimer(const std::string &id, float sec);
|
|
|
|
|
2010-11-27 20:56:38 +01:00
|
|
|
// /** \brief Checks whether a timer expired */
|
2011-03-22 23:01:44 +01:00
|
|
|
bool CheckTimer(const std::string &id);
|
|
|
|
|
|
|
|
// /** \brief Checks whether a timer expired */
|
|
|
|
float GetTimer(const std::string &id);
|
2010-11-27 08:38:32 +01:00
|
|
|
|
2010-04-05 23:38:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _MODELGLOBAL_H */
|
|
|
|
|