void SetGame(Transform parent, string name, string value, bool up) { EquipemtAttributeGame game = GetAttributeGame(parent); game.OnUpdate(name, value, up); BriskGame.Enqueue(game); }
protected void SetGame(Transform parent, string data) { EquipemtAttributeGame game = GetAttributeGame(parent); game.OnUpdate(data); BriskGame.Enqueue(game); }
public override void OnUpdate() { while (BriskGame.Count > 0) { EquipemtAttributeGame game = BriskGame.Dequeue(); game.Close(); IdelGame.Enqueue(game); } AttributeParent.gameObject.SetActive(false); APParent.gameObject.SetActive(false); NeedAttributeParent.gameObject.SetActive(false); }
EquipemtAttributeGame GetAttributeGame(Transform parent) { EquipemtAttributeGame con = null; if (IdelGame.Count > 0) { con = IdelGame.Dequeue(); } else { GameObject game = Instantiate <GameObject>(AttributeGamePrefab); game.transform.localScale = Vector3.one; con = game.AddComponent <EquipemtAttributeGame>(); con.mAwake(); } if (parent.gameObject.activeSelf == false) { parent.gameObject.SetActive(true); } con.transform.SetParent(parent, false); return(con); }