Beispiel #1
0
        ///////////////////////////////////////////////////
        // Member Functions
        ///////////////////////////////////////////////////

        /// <summary>
        /// Generic constructor
        /// </summary>
        public BasicDefense(VehInfo.Car type, Helpers.ObjectState state, Arena arena, Script_CTFHQ _ctfhq, Player _owner)
            : base(type, state, arena,
                   new SteeringController(type, state, arena))
        {
            Random rnd = new Random();

            //Handle movements
            _seperation = (float)rnd.NextDouble();
            steering    = _movement as SteeringController;

            //Our weapon to use when we are close to the enemy
            _weaponClose = new WeaponController(_state, new WeaponController.WeaponSettings());
            _weaponFar   = new WeaponController(_state, new WeaponController.WeaponSettings());

            //Equip our normal weapon
            if (type.InventoryItems[0] != 0)
            {
                _weaponFar.equip(AssetManager.Manager.getItemByID(type.InventoryItems[0]));
            }

            //Setup our second weapon
            if (type.InventoryItems[1] != 0)
            {
                _weaponClose.equip(AssetManager.Manager.getItemByID(type.InventoryItems[1]));
            }



            ctfhq = _ctfhq;
            owner = _owner;
        }
Beispiel #2
0
        private bool _hq;                       //Tells us if HQ exists

        ///////////////////////////////////////////////////
        // Member Functions
        ///////////////////////////////////////////////////

        /// <summary>
        /// Generic constructor
        /// </summary>
        public Engineer(VehInfo.Car type, Helpers.ObjectState state, Arena arena, Script_CTFHQ _ctfhq)
            : base(type, state, arena,
                   new SteeringController(type, state, arena))
        {
            Random rnd = new Random();

            _seperation = (float)rnd.NextDouble();
            steering    = _movement as SteeringController;

            if (type.InventoryItems[0] != 0)
            {
                _weapon.equip(AssetManager.Manager.getItemByID(type.InventoryItems[0]));
            }

            ctfhq         = _ctfhq;
            _tickLastRet  = 0;
            _tickLastHeal = 0;
        }
Beispiel #3
0
        ///////////////////////////////////////////////////
        // Member Functions
        ///////////////////////////////////////////////////

        /// <summary>
        /// Generic constructor
        /// </summary>
        public Captain(VehInfo.Car type, Helpers.ObjectState state, Arena arena, Script_CTFHQ _ctfhq, Player _owner)
            : base(type, state, arena,
                   new SteeringController(type, state, arena))
        {
            Random rnd = new Random();

            _seperation = (float)rnd.NextDouble();
            steering    = _movement as SteeringController;

            if (type.InventoryItems[0] != 0)
            {
                _weapon.equip(AssetManager.Manager.getItemByID(type.InventoryItems[0]));
            }

            ctfhq = _ctfhq;
            owner = _owner;
            //figure out method to keep track of level if they died otherwise they will multiply bots - big bug
            lastCheckedLevel = 2; //They had to have gotton to level two to get a bot
        }