public override void OnInit() { base.OnInit(); _controller = socialController = new SocialController(this); mailScreen = transform.Find("MailScreen").gameObject.AddComponent <MailView>(); friendScreen = transform.Find("FriendScreen").gameObject.AddComponent <FriendView>(); mailToggle = transform.Find("ToggleGroup/MailToggle").GetComponent <Toggle>(); friendToggle = transform.Find("ToggleGroup/FriendToggle").GetComponent <Toggle>(); mailScreen.Init(); friendScreen.Init(); friendScreen.gameObject.SetActive(false); friendToggle.onValueChanged.AddListener(FriendScreenStatusChange); mailToggle.onValueChanged.AddListener(MailScreenStatusChange); friendScreen.RegisterFriendScreenMessageHandler(); }
public MailController(MailView v) { view = v; }