Пример #1
0
        public static Command write(List <int> equippedLauncherTypes, AmmunitionTypeModule rocketType, int currentLoad)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(equippedLauncherTypes.Count);
            foreach (var type in equippedLauncherTypes)
            {
                cmd.Integer(type);
            }
            cmd.AddBytes(rocketType.write());
            cmd.Integer(currentLoad);
            return(new Command(cmd.ToByteArray(), false));
        }
Пример #2
0
 public AmmunitionCountModule(AmmunitionTypeModule type, double amount)
 {
     this.type   = type;
     this.amount = amount;
 }
        public static Command write(int attackerId, int targetId, bool hit, int currentLoad, AmmunitionTypeModule rocketType)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(attackerId);
            cmd.Integer(targetId);
            cmd.Boolean(hit);
            cmd.Integer(currentLoad);
            cmd.AddBytes(rocketType.write());
            return(new Command(cmd.ToByteArray(), false));
        }