コード例 #1
0
ファイル: SystemPartData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        SystemPartData mData = (SystemPartData)data;

        if (mData.version != null)
        {
            if (this.version == null)
            {
                return(false);
            }
            if (!this.version.dataEquals(mData.version))
            {
                return(false);
            }
        }
        else
        {
            if (this.version != null)
            {
                return(false);
            }
        }

        if (this.serverTime != mData.serverTime)
        {
            return(false);
        }

        if (this.isBlock != mData.isBlock)
        {
            return(false);
        }

        if (this.flowStep != mData.flowStep)
        {
            return(false);
        }

        if (mData.keepSave != null)
        {
            if (this.keepSave == null)
            {
                return(false);
            }
            if (!this.keepSave.dataEquals(mData.keepSave))
            {
                return(false);
            }
        }
        else
        {
            if (this.keepSave != null)
            {
                return(false);
            }
        }

        if (mData.clientRandomSeeds != null)
        {
            if (this.clientRandomSeeds == null)
            {
                return(false);
            }
            if (this.clientRandomSeeds.Length != mData.clientRandomSeeds.Length)
            {
                return(false);
            }
            int[] clientRandomSeedsT   = this.clientRandomSeeds;
            int[] clientRandomSeedsR   = mData.clientRandomSeeds;
            int   clientRandomSeedsLen = clientRandomSeedsT.Length;
            for (int clientRandomSeedsI = 0; clientRandomSeedsI < clientRandomSeedsLen; ++clientRandomSeedsI)
            {
                int clientRandomSeedsU = clientRandomSeedsT[clientRandomSeedsI];
                int clientRandomSeedsV = clientRandomSeedsR[clientRandomSeedsI];
                if (clientRandomSeedsU != clientRandomSeedsV)
                {
                    return(false);
                }
            }
        }
        else
        {
            if (this.clientRandomSeeds != null)
            {
                return(false);
            }
        }

        if (this.clientRandomSeedIndex != mData.clientRandomSeedIndex)
        {
            return(false);
        }

        if (this.clientOfflineWorkReceiveIndex != mData.clientOfflineWorkReceiveIndex)
        {
            return(false);
        }

        if (mData.gmCommandSet != null)
        {
            if (this.gmCommandSet == null)
            {
                return(false);
            }
            if (this.gmCommandSet.size() != mData.gmCommandSet.size())
            {
                return(false);
            }
            SSet <string> gmCommandSetR = mData.gmCommandSet;
            if (!this.gmCommandSet.isEmpty())
            {
                string[] gmCommandSetVKeys = this.gmCommandSet.getKeys();
                for (int gmCommandSetVI = gmCommandSetVKeys.Length - 1; gmCommandSetVI >= 0; --gmCommandSetVI)
                {
                    if (gmCommandSetVKeys[gmCommandSetVI] != null)
                    {
                        string gmCommandSetV = gmCommandSetVKeys[gmCommandSetVI];
                        if (!gmCommandSetR.contains(gmCommandSetV))
                        {
                            return(false);
                        }
                    }
                }
            }
        }
        else
        {
            if (this.gmCommandSet != null)
            {
                return(false);
            }
        }

        if (this.gmType != mData.gmType)
        {
            return(false);
        }

        if (this.serverBornCode != mData.serverBornCode)
        {
            return(false);
        }

        if (this.serverStartTime != mData.serverStartTime)
        {
            return(false);
        }

        if (mData.logQueue != null)
        {
            if (this.logQueue == null)
            {
                return(false);
            }
            if (this.logQueue.size() != mData.logQueue.size())
            {
                return(false);
            }
            SQueue <InfoLogData> logQueueT = this.logQueue;
            SQueue <InfoLogData> logQueueR = mData.logQueue;
            int logQueueLen = logQueueT.size();
            for (int logQueueI = 0; logQueueI < logQueueLen; ++logQueueI)
            {
                InfoLogData logQueueU = logQueueT.get(logQueueI);
                InfoLogData logQueueV = logQueueR.get(logQueueI);
                if (logQueueV != null)
                {
                    if (logQueueU == null)
                    {
                        return(false);
                    }
                    if (!logQueueU.dataEquals(logQueueV))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (logQueueU != null)
                    {
                        return(false);
                    }
                }
            }
        }
        else
        {
            if (this.logQueue != null)
            {
                return(false);
            }
        }

        if (this.nextDailyTime != mData.nextDailyTime)
        {
            return(false);
        }

        if (mData.createDate != null)
        {
            if (this.createDate == null)
            {
                return(false);
            }
            if (!this.createDate.dataEquals(mData.createDate))
            {
                return(false);
            }
        }
        else
        {
            if (this.createDate != null)
            {
                return(false);
            }
        }

        if (this.clientRandomSeedKey != mData.clientRandomSeedKey)
        {
            return(false);
        }

        return(true);
    }
コード例 #2
0
        private void drawOne(SerializedProperty property, Rect rect, int index)
        {
            SerializedProperty one = property.GetArrayElementAtIndex(index);

            SerializedProperty nameP = one.FindPropertyRelative("name");
            SerializedProperty objP  = one.FindPropertyRelative("obj");

            if (objP.objectReferenceValue != null)
            {
                if (_checkObjRepeatSet.contains(objP.objectReferenceValue))
                {
                    objP.objectReferenceValue = null;
                }
                else
                {
                    _checkObjRepeatSet.add(objP.objectReferenceValue);
                }
            }


            float halfWidth = rect.width / 2;
            Rect  leftRect  = new Rect(rect.x, rect.y, halfWidth, rect.height);

            string text = nameP.stringValue;

            EditorGUI.BeginChangeCheck();

            if (objP.objectReferenceValue != null)
            {
                if (text.Equals(""))
                {
                    text = objP.objectReferenceValue.name;
                }

                if (_checkNameRepeatSet.contains(text))
                {
                    text = "";
                }
                else
                {
                    _checkNameRepeatSet.add(text);
                }
            }
            else
            {
                text = "";
            }

            nameP.stringValue = text;

            text = EditorGUI.TextField(leftRect, text);

            if (EditorGUI.EndChangeCheck())
            {
                nameP.stringValue = text;
            }

            Rect rightRect = new Rect(rect.x + halfWidth, rect.y, halfWidth, rect.height);

            EditorGUI.PropertyField(rightRect, objP, GUIContent.none);
        }
コード例 #3
0
ファイル: TriggerMethod.cs プロジェクト: shineTeam7/home3
 /// <summary>
 /// Set包含
 /// </summary>
 public bool func_SetContains(TriggerExecutor e, TriggerArg a, SSet <object> map, object key)
 {
     return(map.contains(key));
 }