public void DeleteObject() { if (null != this.transferEffectMaterial) { this.transferEffectMaterial.mainTexture = null; this.transferEffectMaterial.shader = null; this.transferEffectMaterial = null; } if (this.transferEffectController != null) { for (int i = 0; i < this.transferEffectController.Length; i++) { if (null != this.transferEffectController[i]) { UnityEngine.Object.Destroy(this.transferEffectController[i].gameObject); this.transferEffectController[i] = null; } } } if (null != this.monsterRenderTexture) { UnityEngine.Object.Destroy(this.monsterRenderTexture.gameObject); this.monsterRenderTexture = null; } }
public void ShowMonster(MonsterData[] monsterDataList) { List <string> list = new List <string>(); for (int i = 0; i < monsterDataList.Length; i++) { string filePath = MonsterObject.GetFilePath(monsterDataList[i].GetMonsterMaster().Group.modelId); list.Add(filePath); } this.monsterCount = list.Count; GameObject gameObject = GUIManager.LoadCommonGUI("Render3D/Render3DPartyRT", null); this.monsterRenderTexture = gameObject.GetComponent <CommonRender3DPartyRT>(); this.monsterRenderTexture.SetCameraBackgroundColor(this.renderTextureColor); this.monsterRenderTexture.LoadCharas(list, this.rootPosition.x, this.rootPosition.y); this.renderTargetTexture.gameObject.SetActive(true); this.renderTargetTexture.mainTexture = this.monsterRenderTexture.SetRenderTarget(1136, 820, 16); this.monsterRenderTexture.SetAnimation(CharacterAnimationType.attacks); }