Beispiel #1
0
        public override int GetHashCode()
        {
            int hashCode = -2072340198;

            hashCode = hashCode * -1521134295 + ManagerId.GetHashCode();
            hashCode = hashCode * -1521134295 + Path.GetHashCode();
            hashCode = hashCode * -1521134295 + Query.GetHashCode();
            return(hashCode);
        }
Beispiel #2
0
        private void AnalysisMsg(MessageBase tmpMsg)
        {
            ManagerId   tmpId   = tmpMsg.GetManager();
            ManagerBase manager = GetManager(tmpId);

            if (manager != null)
            {
                manager.ProcessMessage(tmpMsg);
            }
        }
Beispiel #3
0
 public override string ToString()
 {
     return(new StringBuilder()
            .Append("Manager ID: ")
            .AppendLine(ManagerId.ToString())
            .Append("Name: ")
            .AppendLine(Name)
            .Append("Department: ")
            .AppendLine(Department.ToString())
            .ToString());
 }
Beispiel #4
0
        private ManagerBase GetManager(ManagerId id)
        {
            var managers = FindObjectsOfType <ManagerBase>();

            foreach (ManagerBase manager in managers)
            {
                if (manager.m_managerId == id)
                {
                    return(manager);
                }
            }

            return(null);
        }
Beispiel #5
0
        public override int GetHashCode()
        {
            int hashCode = -782252986;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Email);

            hashCode = hashCode * -1521134295 + Experience.GetHashCode();
            hashCode = hashCode * -1521134295 + PositionId.GetHashCode();
            hashCode = hashCode * -1521134295 + SalaryCategoryId.GetHashCode();
            hashCode = hashCode * -1521134295 + ManagerId.GetHashCode();
            return(hashCode);
        }
Beispiel #6
0
    /// <summary>
    /// 处理所有模块的消息分发。
    /// </summary>
    /// <param name="tmpMsg"></param>
    private void AnasysisMsg(MsgBase tmpMsg)
    {
        ManagerId tmpId = tmpMsg.GetManager();

        switch (tmpId)
        {
        case ManagerId.AssetManager:
            AssetBundleManager.Instance.SendMsg(tmpMsg);
            break;

        case ManagerId.AudioManager:

            break;

        case ManagerId.CharacterManager:

            break;

        case ManagerId.GameManager:

            break;

        case ManagerId.NetManager:
            NetManager.Instance.SendMsg(tmpMsg);
            break;

        case ManagerId.NPCManager:
            NPCManager.Instance.SendMsg(tmpMsg);
            break;

        case ManagerId.UIManader:
            UIManager.Instance.SendMsg(tmpMsg);
            break;

        case ManagerId.TabToyManager:
            TabToyManager.Instance.SendMsg(tmpMsg);
            break;

        default:
            break;
        }
    }
Beispiel #7
0
    public void SendToMsg(MsgBase msg)
    {
        ManagerId managerId = msg.GetManager();

        switch (managerId)
        {
        case ManagerId.AssetManager: break;

        case ManagerId.AudioManager: break;

        case ManagerId.GameManager: break;

        case ManagerId.NetManager: break;

        case ManagerId.UIManager: break;

        default:
            Debug.LogError("msg");
            break;
        }
    }
Beispiel #8
0
 public override int GetHashCode()
 {
     return(ManagerId.GetHashCode() ^ Path.GetHashCode() ^ Query.GetHashCode());
 }