public GfxObject createObject(string objName, GFXObjectType objType) { GfxObject gfxObject = null; switch (objType) { case GFXObjectType.ACTOR: { gfxObject = new GfxActor(objName); } break; case GFXObjectType.EFFECT: { gfxObject = new GfxEffect(objName); } break; case GFXObjectType.DUMY: { gfxObject = new GfxDummyObject(); } break; } mObjectList.Add(gfxObject); mCurEnumertor = mObjectList.GetEnumerator(); return(gfxObject); }
public void DestroyObject(GfxObject gfxObject) { if (gfxObject != null) { gfxObject.destroy(); mObjectList.Remove(gfxObject); mCurEnumertor = mObjectList.GetEnumerator(); } }
void OnEvent(GAME_EVENT_ID eventid, List <string> vParams) { switch (eventid) { case GAME_EVENT_ID.GE_UPDATE_PET_PAGE: { FakeObject = null; mRender = null; } break; } }
void UpdateObject() { if (gameObject.name == "RoleTipShowPlayer")//是角色面板 { if (CObjectManager.Instance.getPlayerMySelf().getAvatar() != null && CObjectManager.Instance.getPlayerMySelf().getAvatar().GetRenderInterface() != null) { FakeObject = CObjectManager.Instance.getPlayerMySelf().getAvatar().GetRenderInterface(); FakeObject.GetLocator("FootEffectLocator", ref mFakeObjectPos); } } else if (gameObject.name == "PetModelShow") { if (mSelfEquipt == null) { GameObject roleTipWindow = UIWindowMng.Instance.GetWindowGo("RoleTipWindow"); mSelfEquipt = roleTipWindow.GetComponent <UISelfEquip>(); } SDATA_PET pet = CDataPool.Instance.Pet_GetValidPet(mSelfEquipt.ActivePet);//CDataPool.Instance.Pet_GetPet(mSelfEquipt.ActivePet); if (pet != null && pet.FakeObject != null) { //由于宠物的skinmeshrenderer是在主gameobject下面,所以需要取子节点的meshrender add by ss FakeObject = pet.FakeObject.GetRenderInterface(); SkinnedMeshRenderer render = FakeObject.getGameObject().GetComponentInChildren <SkinnedMeshRenderer>(); if (mRender != render) { mRender = render; FakeObject.GetLocator("FootEffectLocator", ref mFakeObjectPos); } } } // else if ()//其他fake window // { // } // }
public virtual void Detach_Object(GfxObject pObject) { }
public virtual void Attach_Object(GfxObject pObject, string szAttachLocator) { }