public void Release() { Dictionary <IEntiny, HUDBoard> .Enumerator em = mBoards.GetEnumerator(); while (em.MoveNext()) { HUDBoard window = em.Current.Value; window.Release(); } em.Dispose(); mBoards.Clear(); }
public void Release(IEntiny entiny) { HUDBoard window = null; mBoards.TryGetValue(entiny, out window); if (window != null) { window.Release(); mBoards.Remove(entiny); } }
public CharacterHUD(Character owner) { this.mOwner = owner; if (GTLauncher.Instance.CurrCopyType != ECopyType.TYPE_CITY && GTLauncher.Instance.CurrCopyType != ECopyType.TYPE_WORLD && GTLauncher.Instance.CurrCopyType != ECopyType.TYPE_AREA) { return; } this.mBoard = GTWorld.Instance.Hud.Create(mOwner); this.mBoard.name = GTTools.Format("Character_HUD_{0}_{1}", owner.GUID, owner.ID); }
public HUDBoard Create(IEntiny entiny) { HUDBoard window = null; mBoards.TryGetValue(entiny, out window); if (window == null) { GameObject go = GTPoolManager.Instance.GetObject(GTPrefabKey.PRE_UIBOARD); window = go.GET <HUDBoard>(); } window.SetTarget(entiny.CacheTransform); window.SetPath(GTPrefabKey.PRE_UIBOARD); window.SetVisable(false); mBoards.Add(entiny, window); return(window); }
public CharacterHUD(Character owner) { this.mOwner = owner; if (GTLauncher.Instance.CurrSceneType != ESceneType.TYPE_CITY && GTLauncher.Instance.CurrSceneType != ESceneType.TYPE_WORLD && GTLauncher.Instance.CurrSceneType != ESceneType.TYPE_AREA) { return; } if (mOwner.Type == EActorType.NPC || mOwner.Type == EActorType.PLAYER || mOwner.Type == EActorType.MONSTER) { this.mBoard = GTWorld.Instance.Hud.Create(mOwner); this.mBoard.name = GTTools.Format("Character_HUD_{0}_{1}", owner.GUID, owner.ID); } }