Example #1
0
        private void Start()
        {
            m_LinkManager        = LinkManager.instance;
            m_MovementController = GetComponent <MovementController>();
            bulletsQuantity      = GetComponent <BulletsQuantityUnit>();
            chController         = GetComponent <CharacterController>();
            shootingCheck        = GetComponent <ShootingCheck>();
            helthbarUnit         = GetComponent <HelthbarUnit>();
            animator             = GetComponent <Animator>();

            if (!isBot)
            {
                movementController   = GetComponent <MovementController>();
                inputController      = GetComponent <InputController>();
                setTarget            = GetComponent <SetTarget>();
                m_LinkManager.player = this;
                SetPlayerMoveSettings();
                setTarget.SetTargetForBotAttack();
                SetMobileGrenadeSettings();
            }
            else
            {
                bot = GetComponent <Bot>();
            }

            SetWeapon(idWeaponAtStart);
        }
Example #2
0
        public void SetQuantityBullets(BulletsQuantityUnit bulletsQuantity)
        {
            var bulletsInClip = bulletsQuantity.quantityBulletsInClip;
            var allBullets    = bulletsQuantity.allBulletsWeapon;

            m_QuantityBullets.text = $"{bulletsInClip}/{allBullets}";
        }