Beispiel #1
0
        /// <summary>
        /// Initialise this component
        /// </summary>
        private void Init()
        {
            // Cache our transform
            mTransform = transform;

            // Grab our component
            mTankMovement = GetComponent <TankMovement>();
        }
Beispiel #2
0
        /// <inheritdoc />
        protected override void PickupItem(GameObject other)
        {
            // Check we have a Tank Movement script
            TankMovement tankMovement = other.GetComponent <TankMovement>();

            if (!tankMovement)
            {
                return;
            }

            // Boost the speed
            tankMovement.BoostSpeed(BoostedSpeedValue, BoostedSpeedDuration);
        }
Beispiel #3
0
 private void Awake()
 {
     // Garb our components
     mTankMovement             = GetComponent <TankMovement>();
     mTankWeaponHandlerHandler = GetComponent <TankWeaponHandler>();
 }