Ejemplo 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)));
 }
Ejemplo n.º 2
0
    public Collider GetCollider()
    {
        if (null == m_pCollider)
        {
            m_pCollider = SHGameObject.GetComponent <Collider>(gameObject);
        }

        return(m_pCollider);
    }
Ejemplo 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));
     });
 }
Ejemplo n.º 4
0
 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));
     });
 }
Ejemplo 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));
    }
Ejemplo n.º 6
0
 // 인터페이스 : 빈 게임오브젝트를 생성하고 컴퍼넌트를 추가한뒤 얻어낸다.
 public T GetCreateComponent <T>(string strName) where T : Component
 {
     return(SHGameObject.GetComponent <T>(SHGameObject.CreateEmptyObject(strName)));
 }