Beispiel #1
0
        public void ParseFrom(byte[] buffer, int offset, int size)
        {
            if (buffer == null)
            {
                return;
            }
            ProtoBufferReader reader = new ProtoBufferReader(buffer, offset, size);

            foreach (ProtoBufferObject obj in reader.ProtoBufferObjs)
            {
                switch (obj.FieldNumber)
                {
                case 1:
                    SkillCode = obj.Value;
                    break;

                case 2:
                    PhysicalDamage = obj.Value;
                    break;

                case 3:
                    SyncData = new SyncData();
                    SyncData.ParseFrom(obj.Value);
                    break;

                case 4:
                    Ko = obj.Value;
                    break;

                default:
                    break;
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 使用技能成功。
 /// </summary>
 public UseSkillOk
 (
     int skillCode,
     int physicalDamage,
     SyncData syncData
 ) : this()
 {
     SkillCode      = skillCode;
     PhysicalDamage = physicalDamage;
     SyncData       = syncData;
 }
Beispiel #3
0
 /// <summary>
 /// 对手使用技能。
 /// </summary>
 public RivalUseSkill
 (
     int skillCode,
     int skillLevel,
     SyncData syncData,
     int physicalDamage
 ) : this()
 {
     SkillCode      = skillCode;
     SkillLevel     = skillLevel;
     SyncData       = syncData;
     PhysicalDamage = physicalDamage;
 }