Exemplo n.º 1
0
    private void WeaponOrder()

    {
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            WeaponId = Pistol;
            ChooseWepDel?.Invoke(ReturnWeaponID(WeaponId));
        }

        if (Input.GetKeyDown(KeyCode.Alpha2) && shotgunUnlocked)
        {
            WeaponId = Shotgun;
            ChooseWepDel?.Invoke(ReturnWeaponID(WeaponId));
        }

        if (Input.GetKeyDown(KeyCode.Alpha3) && arUnlocked)
        {
            WeaponId = AR;
            ChooseWepDel?.Invoke(ReturnWeaponID(WeaponId));
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     WeaponId = Pistol;
     ChooseWepDel?.Invoke(ReturnWeaponID(WeaponId));
     _pc = GetComponent <PlayerController>();
 }