コード例 #1
0
ファイル: RoundInfo.cs プロジェクト: Razer2015/BattleAPI
        //public RoundInfo(MemoryStream stream, bool isAttacker)
        //{
        //    Attacker = isAttacker ? (byte)1 : (byte)0;
        //    if (!isAttacker) stream.Position += 1;
        //    Team = stream.Read1Byte();

        //    if (isAttacker)
        //    {
        //        stream.Position += 1;
        //        Tickets = stream.ReadUInt16(ByteConverter.Big);
        //        TicketsMax = stream.ReadUInt16(ByteConverter.Big);
        //    }
        //    else
        //    {
        //        stream.Position += 4;
        //        Bases = stream.Read1Byte();
        //        BasesMax = stream.Read1Byte();
        //    }
        //}

        public RoundInfo(RoundInfo rInfo)
        {
            this.Team            = rInfo.Team;
            this.Bases           = rInfo.Bases;
            this.BasesMax        = rInfo.BasesMax;
            this.Attacker        = rInfo.Attacker;
            this.Tickets         = rInfo.Tickets;
            this.TicketsMax      = rInfo.TicketsMax;
            this.FlagsMax        = rInfo.FlagsMax;
            this.RoundTimeMax    = rInfo.RoundTimeMax;
            this.Flags           = rInfo.Flags;
            this.Kills           = rInfo.Kills;
            this.KillsMax        = rInfo.KillsMax;
            this.DestroyedCrates = rInfo.DestroyedCrates;
            this.CarrierHealth   = rInfo.CarrierHealth;
        }
コード例 #2
0
ファイル: Rush.cs プロジェクト: Razer2015/BattleAPI
        //public Rush(MemoryStream stream)
        //{
        //    var pos = stream.Position;
        //    Attackers = new RoundInfo(stream, true);
        //    stream.Position = pos;
        //    Defenders = new RoundInfo(stream, false);
        //}

        public Rush(Rush rush)
        {
            this.Defenders = (rush.Defenders == null) ? null : new RoundInfo(rush.Defenders);
            this.Attackers = (rush.Attackers == null) ? null : new RoundInfo(rush.Attackers);
        }