Exemple #1
0
        private static void SendAfterModelCreatedMessage(GameObject rootObj, RenderModelHook hook)
        {
            var iList = ListPool <ICustomModel> .Get(); try

            {
                rootObj.GetComponentsInChildren(true, iList);
                for (int i = 0, imax = iList.Count; i < imax; ++i)
                {
                    iList[i].OnAfterModelCreated(hook);
                }
            }
            finally { ListPool <ICustomModel> .Release(iList); }
        }
Exemple #2
0
        private static bool SendBeforeModelDeactivatedMessage(GameObject rootObj, RenderModelHook hook)
        {
            var result = true;
            var iList  = ListPool <ICustomModel> .Get(); try

            {
                rootObj.GetComponentsInChildren(true, iList);
                for (int i = 0, imax = iList.Count; i < imax; ++i)
                {
                    result &= iList[i].OnBeforeModelDeactivated(hook);
                }
            }
            finally { ListPool <ICustomModel> .Release(iList); }
            return(result);
        }
 public void Initialize(RenderModelHook hook)
 {
     this.hook = hook;
 }
 public bool OnBeforeModelDeactivated(RenderModelHook hook)
 {
     return(true);
 }
 public void OnAfterModelCreated(RenderModelHook hook)
 {
     m_viveRole.Set(hook.viveRole);
 }