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