Esempio n. 1
0
 public T Get <T>(
     string strName,
     ePoolReturnType eReturnType   = ePoolReturnType.Disable,
     ePoolDestroyType eDestroyType = ePoolDestroyType.ChangeScene) where T : Component
 {
     return(SHGameObject.GetComponent <T>(Get(strName, eReturnType, eDestroyType)));
 }
Esempio n. 2
0
    public Collider GetCollider()
    {
        if (null == m_pCollider)
        {
            m_pCollider = SHGameObject.GetComponent <Collider>(gameObject);
        }

        return(m_pCollider);
    }
Esempio n. 3
0
 public void Get <T>(string strName,
                     eObjectPoolReturnType eReturnType,
                     eObjectPoolDestroyType eDestroyType,
                     Action <T> pCallback) where T : Component
 {
     Get(strName, eReturnType, eDestroyType, (pObject) =>
     {
         pCallback(SHGameObject.GetComponent <T>(pObject));
     });
 }
 void CreateEffectChannel()
 {
     ClearChannel(m_dicEffectChannel);
     m_dicEffectChannel.Clear();
     SHUtils.ForToEnum <eSoundEffectChannel>((eEffectChannel) =>
     {
         var pObject = new GameObject(eEffectChannel.ToString());
         pObject.transform.SetParent(transform);
         m_dicEffectChannel.Add(eEffectChannel, SHGameObject.GetComponent <AudioSource>(pObject));
     });
 }
Esempio n. 5
0
    private Animation GetAnimation(GameObject pObject = null)
    {
        if (null != m_pAnim)
        {
            return(m_pAnim);
        }

        if (null == pObject)
        {
            pObject = gameObject;
        }

        return(m_pAnim = SHGameObject.GetComponent <Animation>(pObject));
    }
Esempio n. 6
0
 // 인터페이스 : 빈 게임오브젝트를 생성하고 컴퍼넌트를 추가한뒤 얻어낸다.
 public T GetCreateComponent <T>(string strName) where T : Component
 {
     return(SHGameObject.GetComponent <T>(SHGameObject.CreateEmptyObject(strName)));
 }