Ejemplo n.º 1
0
	public override void OnLoadedUI(bool close3dTouch, object args) {
		base.OnLoadedUI(close3dTouch, args);
		_anchorBottomLeft = transform.Find("Anchor_Bottom_Left");
		_anchorBottom = transform.Find("Anchor_Bottom");
		_chatDetail = transform.Find("Anchor_Left/chat_back");
		_detailTween = _chatDetail.GetComponent<TweenPosition>();

		_detailTween.SetOnFinished(() => {
			if (_detailTween.direction == AnimationOrTween.Direction.Forward) {
				_anchorBottomLeft.gameObject.SetActive(false);
			}
		});
		RegistUIBase<ChatUIExpSlider>(_anchorBottom);
		RegisterEvent(EnumEventDispathcer.ChatViewRefreshPanel,RefreshChatPanel);
		RegisterEvent(EnumEventDispathcer.ChatViewRefreshHistory, RefreshHistory);

		_chatUIChatPanel = RegistUIBase<ChatUIChatPanel>(_anchorBottomLeft);
		_chatDetailView = RegistUIBase<ChatDetailView>(_chatDetail);
		_chatDetail.gameObject.SetActive(false);
		playName = "王五";
	}
Ejemplo n.º 2
0
    public override void OnLoadedUI(bool close3dTouch, object args)
    {
        base.OnLoadedUI(close3dTouch, args);
        _anchorBottomLeft = transform.Find("Anchor_Bottom_Left");
        _anchorBottom     = transform.Find("Anchor_Bottom");
        _chatDetail       = transform.Find("Anchor_Left/chat_back");
        _detailTween      = _chatDetail.GetComponent <TweenPosition>();

        _detailTween.SetOnFinished(() => {
            if (_detailTween.direction == AnimationOrTween.Direction.Forward)
            {
                _anchorBottomLeft.gameObject.SetActive(false);
            }
        });
        RegistUIBase <ChatUIExpSlider>(_anchorBottom);
        RegisterEvent(EnumEventDispathcer.ChatViewRefreshPanel, RefreshChatPanel);
        RegisterEvent(EnumEventDispathcer.ChatViewRefreshHistory, RefreshHistory);

        _chatUIChatPanel = RegistUIBase <ChatUIChatPanel>(_anchorBottomLeft);
        _chatDetailView  = RegistUIBase <ChatDetailView>(_chatDetail);
        _chatDetail.gameObject.SetActive(false);
        playName = "王五";
    }