public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { room_tab = com.GetControllerAt(0); draw_pile_txt = (GTextField)com.GetChildAt(6); discard_pile_txt = (GTextField)com.GetChildAt(8); run_cost_txt = (GTextField)com.GetChildAt(10); end_run_btn = (GButton)com.GetChildAt(11); player_hp_txt = (GTextField)com.GetChildAt(12); player_attack_txt = (GTextField)com.GetChildAt(13); room1 = FUIRoom.Create(domain, com.GetChildAt(17)); room2 = FUIRoom.Create(domain, com.GetChildAt(18)); room3 = FUIRoom.Create(domain, com.GetChildAt(19)); } }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; room_tab = null; draw_pile_txt = null; discard_pile_txt = null; run_cost_txt = null; end_run_btn = null; player_hp_txt = null; player_attack_txt = null; room1.Dispose(); room1 = null; room2.Dispose(); room2 = null; room3.Dispose(); room3 = null; }