/* 发往视图层 */ /// <summary> /// 按钮 新用户 处理 /// </summary> private void NewUserHandle() { if (_currentUserItem != null) { _currentUserItem.GetComponent <Toggle>().isOn = false; } // 发送消息,给 “用户表单” 视图 SendNotification(Proconst.MSG_ADDNEWUSERINFO_TOUSERFORM_MEDIATOR); }
/// <summary> /// 实例化用户信息 克隆信息的载体 /// </summary> /// <returns></returns> private UserList_Item InitUserInfo() { UserList_Item tmp = null; if (_userInfoPrefab != null) { // 实例化 tmp = GameObject.Instantiate <UserList_Item>(_userInfoPrefab, Vector3.zero, Quaternion.identity, _userInfoParent); tmp.transform.localScale = Vector3.one; tmp.gameObject.SetActive(true); tmp.GetComponent <Toggle>().group = _userInfoParent.GetComponent <ToggleGroup>(); } return(tmp); }