示例#1
0
        public UnAimUnit(byte[] data, GameSession client) : base(data, client)
        {
            // Tick
            TickUnit();

            _arm = (ArmIndex)GetInt();
        }
示例#2
0
        public StopAttack(byte[] data, GameSession client) : base(data, client)
        {
            _arm = (ArmIndex)GetInt();

            // Standard position update
            GetUnitPositionAndAim();
        }
示例#3
0
        public StartAttack(byte[] data, GameSession client) : base(data, client)
        {
            TickUnit();

            _arm       = (ArmIndex)GetInt();
            _comboStep = GetInt();

            // Read the position information
            GetUnitPositionAndAim();

            // High priority
            HighPriority = true;
        }
示例#4
0
        public AimUnit(byte[] data, GameSession client) : base(data, client)
        {
            TickUnit();

            // Find the target unit
            _target = GetInt();

            // Find which arm is being used
            _arm = (ArmIndex)GetInt();

            // Read the units position and aim
            GetUnitPositionAndAim();
        }
示例#5
0
        private List <ArmIndex> RetrieveIndices(bool retrieveNew = false)
        {
            List <ArmIndex> indices = new List <ArmIndex>();

            ArmIndex libor    = PricingServiceFacade.RetrieveArmIndex(IndexType.Libor, retrieveNew);
            ArmIndex treasury = PricingServiceFacade.RetrieveArmIndex(IndexType.Treasury, retrieveNew);

            if (libor != null)
            {
                indices.Add(libor);
            }
            if (treasury != null)
            {
                indices.Add(treasury);
            }

            return(indices);
        }
示例#6
0
        public AimUnit(byte[] data, GameSession client) : base(data, client)
        {
//            debug = true;

            // TODO: This is just for practice. Improve it?
            if (client.RoomInstance == null)
            {
                return;
            }

            TickUnit();

            // Find the target unit
            _target = GetInt();

            // Find which arm is being used
            _arm = (ArmIndex)GetInt();

            // Read the units position and aim
            GetUnitPositionAndAim();
        }
示例#7
0
        public UnAimUnit(byte[] data, GameSession client) : base(data, client)
        {
            try
            {
//            debug = true;

                // Check practice mode
                if (GetClient().GameInstance == null)
                {
                    return;
                }

                TickUnit();

                _arm = (ArmIndex)GetInt();
            }
            catch (Exception e)
            {
                System.Console.WriteLine("Exception in Unaim unit: " + e.Message);
            }
        }
 public AimUnit(Unit attacker, Unit victim, ArmIndex arm)
 {
     _attacker = attacker;
     _victim   = victim;
     _arm      = arm;
 }
示例#9
0
 protected Weapon(PartRecord partRecord, Unit owner, ArmIndex arm, WeaponSetIndex weaponSet) : base(partRecord, owner)
 {
     Arm       = arm;
     WeaponSet = weaponSet;
 }
示例#10
0
 public Fist(PartRecord partRecord, Unit owner, ArmIndex arm, WeaponSetIndex weaponSet) : base(partRecord, owner, arm, weaponSet)
 {
 }
示例#11
0
 public NullWeapon(Unit owner, ArmIndex arm, WeaponSetIndex weaponSet) : base(null, owner, arm, weaponSet)
 {
     // Always zero
     CurrentOverheat = 0.0f;
     IsOverheated    = false;
 }
示例#12
0
 public Gun(PartRecord partRecord, Unit owner, ArmIndex arm, WeaponSetIndex weaponSet) : base(partRecord, owner, arm, weaponSet)
 {
     Target = new WeakReference <Unit>(null);
 }
示例#13
0
 /// <summary>
 /// Updates users when a target is no longer being aimed at
 /// </summary>
 /// <param name="attacker"></param>
 /// <param name="oldTarget"></param>
 public void NotifyUnitUnAimed(Unit attacker, Unit oldTarget, ArmIndex arm)
 {
     RoomInstance.MulticastPacket(new UnAimUnit(attacker, oldTarget, arm));
 }