Ejemplo n.º 1
0
//  void Update()
//  {
//  }

    // Control Function -----------------------------------------------------------------
    public void SetSpriteFactoryIndex(string spriteName, int nFrameIndex, bool bRunImmediate)
    {
        if (m_NcSpriteFactoryCom == null)
        {
            if (m_NcSpriteFactoryPrefab && m_NcSpriteFactoryPrefab.GetComponent <NcSpriteFactory>() != null)
            {
                m_NcSpriteFactoryCom = m_NcSpriteFactoryPrefab.GetComponent <NcSpriteFactory>();
            }
            else
            {
                return;
            }
        }
        m_nSpriteFactoryIndex = m_NcSpriteFactoryCom.GetSpriteNodeIndex(spriteName);
        SetSpriteFactoryIndex(m_nSpriteFactoryIndex, nFrameIndex, bRunImmediate);
    }