Beispiel #1
0
    void AyncLoadObject()
    {
        if (enabled == false)
        {
            return;
        }
        NcTickTimerTool tickTimer = new NcTickTimerTool();

        for (int n = 0; n < m_nObjectCount; n++)
        {
            if (m_ObjectNodes[n].m_Object == null)
            {
                m_ObjectNodes[n].m_Object    = GetObjectNodeTexture(n);
                m_ObjectContents[n].image    = NgAsset.GetMiniThumbnail(m_ObjectNodes[n].m_Object);
                m_ObjectContents[n].tooltip  = FXMakerTooltip.Tooltip(GetTextureInfo(m_ObjectContents[n].image, true));
                m_ObjectContents[n].tooltip += FXMakerTooltip.AddPopupPreview(m_ObjectContents[n].image);
                m_nNotLoadCount--;
//              return;
                if (200 < tickTimer.GetStartedTickCount())
                {
                    return;
                }
            }
        }
    }
	void AyncLoadObject()
	{
		if (enabled == false)
			return;
		NcTickTimerTool	tickTimer = new NcTickTimerTool();

		for (int n=0; n < m_nObjectCount; n++)
		{
			if (m_ObjectNodes[n].m_Object == null || m_ObjectContents[n].image == null)
			{
				if (m_ObjectNodes[n].m_Object == null)
				{
					m_ObjectNodes[n].m_Object	= GetObjectNodePrefab(n);
				}
				if (m_ObjectContents[n].image == null)
 					m_ObjectContents[n].image	= FXMakerMain.inst.GetPrefabThumbTexture(GetObjectNodePrefab(n));
				if (m_ObjectContents[n].image != null)
				{
					string subDir = AssetDatabase.GetAssetPath(GetObjectNodePrefab(n));
					subDir = NgFile.PathSeparatorNormalize(subDir).Replace(m_LoadDirectory, "");
					m_ObjectContents[n].tooltip	= FXMakerTooltip.Tooltip(GetObjectInfo(GetObjectNodePrefab(n), subDir));
					m_ObjectContents[n].tooltip	+= FXMakerTooltip.AddPopupPreview(m_ObjectContents[n].image);
					m_nNotLoadCount--;
				}

				if (300 < tickTimer.GetStartedTickCount())
					return;
			}
		}
	}
    void AyncLoadObject()
    {
        if (enabled == false)
            return;
        NcTickTimerTool	tickTimer = new NcTickTimerTool();

        for (int n=0; n < m_nObjectCount; n++)
        {
            if (m_ObjectNodes[n].m_Object == null)
            {
                m_ObjectNodes[n].m_Object	= GetObjectNodeTexture(n);
         				m_ObjectContents[n].image	= NgAsset.GetMiniThumbnail(m_ObjectNodes[n].m_Object);
                m_ObjectContents[n].tooltip	= FXMakerTooltip.Tooltip(GetTextureInfo(m_ObjectContents[n].image, true));
                m_ObjectContents[n].tooltip	+= FXMakerTooltip.AddPopupPreview(m_ObjectContents[n].image);
                m_nNotLoadCount--;
        // 				return;
                if (200 < tickTimer.GetStartedTickCount())
                    return;
            }
        }
    }
    void AyncLoadObject()
    {
        if (enabled == false)
            return;
        NcTickTimerTool	tickTimer = new NcTickTimerTool();

        for (int n=0; n < m_nObjectCount; n++)
        {
            if (m_ObjectNodes[n].m_Object == null || m_ObjectContents[n].image == null)
            {
                if (m_ObjectNodes[n].m_Object == null)
                {
                    m_ObjectNodes[n].m_Object	= GetObjectNodePrefab(n);
                }
                if (m_ObjectContents[n].image == null)
         					m_ObjectContents[n].image	= FXMakerMain.inst.GetPrefabThumbTexture(GetObjectNodePrefab(n));
                if (m_ObjectContents[n].image != null)
                {
                    string subDir = AssetDatabase.GetAssetPath(GetObjectNodePrefab(n));
                    subDir = NgFile.PathSeparatorNormalize(subDir).Replace(m_LoadDirectory, "");
                    m_ObjectContents[n].tooltip	= FXMakerTooltip.Tooltip(GetObjectInfo(GetObjectNodePrefab(n), subDir));
                    m_ObjectContents[n].tooltip	+= FXMakerTooltip.AddPopupPreview(m_ObjectContents[n].image);
                    m_nNotLoadCount--;
                }

                if (300 < tickTimer.GetStartedTickCount())
                    return;
            }
        }
    }