Exemplo n.º 1
0
//	public override void Drop(float force, float torque)
//	{
//		base.Drop(force, torque);
//	}

    public override void Take(WeaponInput w)
    {
        base.Take(w);
        GameObject takeGO = weaponModuleBase.grabSoundPool.GetCurrentPooledGameObject();

        SpawnUtilities.instance.SetGOPosition(takeGO, trsf, false);
    }
Exemplo n.º 2
0
 public virtual void Take(WeaponInput w)
 {
     highLightSystem.hightLight = false;
     inHand = true;
     SetPhysics(inHand);
     weaponInput = w;
     trsf.SetParent(w.transform);
     SetPhysics(inHand);
     player.GetItems();
     StartCoroutine(GrabSequence());
 }
Exemplo n.º 3
0
    public virtual void Drop(float force, float torque)
    {
        GameObject dropGO = ObjectPoolManager.instance.Drop01_AS.GetCurrentPooledGameObject();

        SpawnUtilities.instance.SetGOPosition(dropGO, trsf, false);
        StopAllCoroutines();
        inHand = false;
        UpdateUI(true);
        weaponInput.currentGenericItem = null;
        weaponInput.itemInHand         = false;
        weaponInput = null;
        SetPhysics(inHand);
        trsf.SetParent(parent);
        rgdBody.AddForce(trsf.forward * force, ForceMode.VelocityChange);
        rgdBody.AddTorque(trsf.right * torque, ForceMode.VelocityChange);
        player.GetItems();
    }
Exemplo n.º 4
0
        private void Awake()
        {
            _car = GetComponent <Car>();

            _input = new WeaponInput();

            _input.FireOn       += FireOn;
            _input.FireOff      += FireOff;
            _input.SwitchWeapon += SwitchWeapon;

            _input.Init();

            _weapon = new BaseWeapon[_car.WeaponMounts.Length];

            for (int i = 0; i < _car.WeaponMounts.Length; i++)
            {
                _weapon[i] = new Machinegun();

                _weapon[i].SetOrigin(transform, _car.WeaponMounts[i]);
            }
        }