Пример #1
0
 void CUiAnimation::Free()
 {
     if(getSingletonPtr())
     {
         delete getSingletonPtr();
     }
 }
Пример #2
0
	void PlayerRegistry::RemovePlayer(PlayerID id)
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->removePlayer(id);
	}
Пример #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);
	}
Пример #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);
	}
Пример #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());
	}
Пример #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;
	}
Пример #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());
	}
Пример #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);
	}
Пример #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);
	}
Пример #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);
	}
Пример #11
0
	unsigned int PlayerRegistry::GetLocalPlayerCount()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		return registry->getLocalPlayerCount();
	}
Пример #12
0
	void PlayerRegistry::Clear()
	{
		PlayerRegistry *registry = getSingletonPtr();
		FSN_ASSERT_MSG(registry != NULL, "Tried to use un-initialised PlayerRegistry");
		
		registry->clear();
	}
Пример #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);
	}
Пример #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);
	}
Пример #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);
	}
Пример #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;
    }
	static SFCTypesManager &getSingleton( void ) {
		assert( getSingletonPtr() != 0 );
		return *getSingletonPtr();
	}
	static void initSingleton( SFC::CompoundStatement compoundStatement ) {
		if ( getSingletonPtr() != 0 ) delete getSingletonPtr();
		getSingletonPtr() = new SFCTypesManager( compoundStatement );
	}
Пример #19
0
//-----------------------------------------------------------------------
XmlSerializeManager& XmlSerializeManager::getSingleton(void)
{
    return (*getSingletonPtr());
}
Пример #20
0
DataPoolManager& DataPoolManager::getSingleton(void)
{
    return (*getSingletonPtr());
}
Пример #21
0
OPAL_SOUND_MGR void SoundManager::selfDestruct( void )
{
	if ( getSingletonPtr() ) delete getSingletonPtr();
}
Пример #22
0
	static bool isInit() { return getSingletonPtr() != 0; }
Пример #23
0
	GameManager& GameManager::getSingleton() {
		return *getSingletonPtr();
	}