Example #1
0
        public override bool Equals(NetworkSyncItem obj)
        {
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            NetworkSyncVarValue other = (NetworkSyncVarValue)obj;

            List <NetworkSyncItem> otherList = other.Value;

            if (Value.Count != otherList.Count)
            {
                return(false);
            }

            bool allEqual = true;

            for (int i = 0; i < Value.Count; i++)
            {
                allEqual = allEqual && (Value[i].Equals(otherList[i]));
            }

            return(allEqual);
        }
Example #2
0
        public override bool Equals(NetworkSyncItem obj)
        {
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            return(this.Value == ((NetworkSyncFloat)obj).Value);
        }
Example #3
0
        public void Assign(NetworkSyncItem val)
        {
            if (currentItem != null)
            {
                prevItem = currentItem;
            }
            else
            {
                prevItem = val;
            }

            currentItem = val;
        }
Example #4
0
        public override bool Equals(NetworkSyncItem obj)
        {
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }

            List <string> otherList = ((NetworkSyncStringList)obj).Value;

            if (Value.Count != otherList.Count)
            {
                return(false);
            }

            bool allEqual = true;

            for (int i = 0; i < Value.Count; i++)
            {
                allEqual = allEqual && (Value[i].Equals(otherList[i]));
            }

            return(allEqual);
        }
Example #5
0
 public override bool Equals(NetworkSyncItem obj)
 {
     return(obj.GetType() == typeof(NetworkSyncPass));
 }
Example #6
0
 public abstract bool Equals(NetworkSyncItem obj);
Example #7
0
 public void Equalize()
 {
     prevItem = currentItem;
 }
Example #8
0
        public SyncVar(string name, NetworkSyncItem item)
        {
            VariableName = name;

            this.Assign(item);
        }