Ejemplo n.º 1
0
 void CUiAnimation::Free()
 {
     if(getSingletonPtr())
     {
         delete getSingletonPtr();
     }
 }
Ejemplo n.º 2
0
	void PlayerRegistry::RemovePlayer(PlayerID id)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->removePlayer(id);
	}
Ejemplo n.º 3
0
	void PlayerRegistry::AddRemotePlayer(PlayerID id, const RakNetGUID& guid)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->addPlayer(id, s_MaxLocalPlayers, guid);
	}
Ejemplo n.º 4
0
	void PlayerRegistry::RemovePlayersFrom(const RakNetGUID& guid)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->removePlayersFrom(guid);
	}
Ejemplo n.º 5
0
	PlayerRegistry::const_local_player_iterator PlayerRegistry::LocalPlayersEnd()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return const_local_player_iterator(registry->m_ByLocalIndex.end());
	}
Ejemplo n.º 6
0
	bool PlayerRegistry::IsLocal(PlayerID net_index)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getPlayerByNetID(net_index).LocalIndex < s_MaxLocalPlayers;
	}
Ejemplo n.º 7
0
	PlayerRegistry::const_player_iterator PlayerRegistry::PlayersBegin()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return const_player_iterator(registry->m_ByNetID.begin());
	}
Ejemplo n.º 8
0
	const PlayerInfo &PlayerRegistry::GetPlayerByLocalIndex(unsigned int index)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getPlayerByLocalIndex(index);
	}
Ejemplo n.º 9
0
	std::vector<PlayerInfo> PlayerRegistry::GetPlayersBySystem(const RakNetGUID& guid)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getPlayersBySystem(guid);
	}
Ejemplo n.º 10
0
	const PlayerInfo &PlayerRegistry::GetPlayer(PlayerID id)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getPlayerByNetID(id);
	}
Ejemplo n.º 11
0
	unsigned int PlayerRegistry::GetLocalPlayerCount()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getLocalPlayerCount();
	}
Ejemplo n.º 12
0
	void PlayerRegistry::Clear()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->clear();
	}
Ejemplo n.º 13
0
	void PlayerRegistry::RemoveLocalPlayer(unsigned int local_index)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->removeLocalPlayer(local_index);
	}
Ejemplo n.º 14
0
	boost::signals2::connection PlayerRegistry::ConnectToPlayerRemoved(RegistryChangedSigType::slot_type slot)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");

		return registry->SignalPlayerRemoved.connect(slot);
	}
Ejemplo n.º 15
0
	void PlayerRegistry::AddLocalPlayer(PlayerID id, unsigned int local_index)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->addPlayer(id, local_index, UNASSIGNED_RAKNET_GUID);
	}
Ejemplo n.º 16
0
    HRESULT CUiAnimation::Init()
    {
        SASSERT(!getSingletonPtr());
        
            // Create Animation Timer
        SComPtr<IUIAnimationTimer>    pAnimationTimer;

        HRESULT hr = CoCreateInstance(
            __uuidof(UIAnimationTimer),
            NULL,
            CLSCTX_INPROC_SERVER,
            IID_PPV_ARGS(&pAnimationTimer)
            );
        if (SUCCEEDED(hr))
        {
            //创建一个UIAnimation的单例
            new CUiAnimation(pAnimationTimer);
        }

        return hr;
    }
Ejemplo n.º 17
0
	static SFCTypesManager &getSingleton( void ) {
		assert( getSingletonPtr() != 0 );
		return *getSingletonPtr();
	}
Ejemplo n.º 18
0
	static void initSingleton( SFC::CompoundStatement compoundStatement ) {
		if ( getSingletonPtr() != 0 ) delete getSingletonPtr();
		getSingletonPtr() = new SFCTypesManager( compoundStatement );
	}
Ejemplo n.º 19
0
//-----------------------------------------------------------------------
XmlSerializeManager& XmlSerializeManager::getSingleton(void)
{
    return (*getSingletonPtr());
}
Ejemplo n.º 20
0
DataPoolManager& DataPoolManager::getSingleton(void)
{
    return (*getSingletonPtr());
}
Ejemplo n.º 21
0
OPAL_SOUND_MGR void SoundManager::selfDestruct( void )
{
	if ( getSingletonPtr() ) delete getSingletonPtr();
}
Ejemplo n.º 22
0
	static bool isInit() { return getSingletonPtr() != 0; }
Ejemplo n.º 23
0
	GameManager& GameManager::getSingleton() {
		return *getSingletonPtr();
	}