Exemplo n.º 1
0
        public void CopyFrom(achievement_info from)
        {
            if (from == this)
            {
                return;
            }

            Clear();
            MergeFrom(from);
        }
Exemplo n.º 2
0
        public void MergeFrom(achievement_info from)
        {
            if (from == this)
            {
                return;
            }

            // achievementId
            SetAchievementId(from.GetAchievementId());
            // recordKey
            SetRecordKey(from.GetRecordKey());
            // progress
            SetProgress(from.GetProgress());
            // goal
            SetGoal(from.GetGoal());
            // receiveReward
            SetReceiveReward(from.GetReceiveReward());
            // reward
            SetReward(from.GetReward());
        }
Exemplo n.º 3
0
        public void RemoveInfos(achievement_info infos)
        {
            int i = 0;

            for (; i < infos_.Length; ++i)
            {
                if (infos_[i] == infos)
                {
                    break;
                }
            }
            if (i == infos_.Length)
            {
                return;
            }
            for (; i < infos_.Length - 1; ++i)
            {
                infos_[i] = infos_[i + 1];
            }
            Array.Resize(ref infos_, infos_.Length - 1);
        }
Exemplo n.º 4
0
        public bool Deserialize(Stream stream)
        {
            BinaryReader input = new BinaryReader(stream);
            // infos
            uint infosLength = 0;

            if (Yippee.Net.Internal.Deserialize(input, out infosLength) == false)
            {
                return(false);
            }
            Array.Resize(ref infos_, (int)infosLength);
            for (uint i = 0; i < infosLength; ++i)
            {
                achievement_info newInfos = new achievement_info();
                if (newInfos.Deserialize(stream) == false)
                {
                    return(false);
                }
                infos_[i] = newInfos;
            }

            return(true);
        }
Exemplo n.º 5
0
 public void AddInfos(achievement_info infos)
 {
     Array.Resize(ref infos_, infos_.Length + 1);
     infos_[infos_.Length - 1] = infos;
 }
Exemplo n.º 6
0
 public achievement_info(achievement_info from)
 {
     MergeFrom(from);
 }
Exemplo n.º 7
0
 public void SetUpdatedInfo(achievement_info value)
 {
     updatedInfo_ = value;
 }