Exemplo n.º 1
0
 public void OnSelectedSytem(UIsocialSystemManager systemManager)
 {
     if (_selectedSystemSlot != null)
     {
         _selectedSystemSlot.OnDeSelected();
     }
     _selectedSystemSlot = systemManager;
 }
Exemplo n.º 2
0
    private void OnChangeSubStatus(SubStatus subStatus)
    {
        if (subStatus == curSubStatus)
        {
            return;
        }
        curSubStatus = subStatus;
        switch (curSubStatus)
        {
        case SubStatus.Enemy:
            if (_selectedUserSlot != null)
            {
                _selectedUserSlot.OnDeSelected();
                _selectedUserSlot = null;
            }
            uiEnemy.root.gameObject.SetActive(true);
            uiFriend.root.gameObject.SetActive(false);
            uiEnemy.root.Reposition();
            _friendActiveType = FriendActiveType.AddEnemy;
            break;

        case SubStatus.Friend:
            if (_selectedUserSlot != null)
            {
                _selectedUserSlot.OnDeSelected();
                _selectedUserSlot = null;
            }
            uiEnemy.root.gameObject.SetActive(false);
            uiFriend.root.gameObject.SetActive(true);
            uiFriend.root.Reposition();
            _friendActiveType = FriendActiveType.AddFriend;
            break;

        case SubStatus.Report:
            if (_selectedSystemSlot != null)
            {
                _selectedSystemSlot.OnDeSelected();
                _selectedSystemSlot = null;
            }
            uiReport.root.gameObject.SetActive(true);
            uiSystem.root.gameObject.SetActive(false);
            break;

        case SubStatus.System:
            if (_selectedReportSlot != null)
            {
                _selectedReportSlot.OnDeSelected();
                _selectedReportSlot = null;
            }
            uiReport.root.gameObject.SetActive(false);
            uiSystem.root.gameObject.SetActive(true);
            break;
        }
    }