Example #1
0
    public void SetVariablesToWeapon()
    {
        PrefabReset();

        AIWeaponSelected ais = GetComponent <AIWeaponSelected>();
        AIWeaponShoot    aws = GetComponent <AIWeaponShoot>();

        ais.ammoCurrent           = ammoCurrent;
        ais.ammoInNewMagazine     = ammoInNewMagazine;
        ais.magazines             = magazines;
        ais.rateOfFire            = rateOfFire;
        ais.secondsToReload       = secondsToReload;
        ais.magazineObjectThrow   = magazineObjectThrow;
        ais.throwForce            = throwForce;
        ais.magazineThrowPosition = magazineThrowPosition;
        ais.ikLeftHand            = ikLeftHand;
        ais.ikRightHand           = ikRightHand;
        aws.bulletToUse           = bulletToUse;
        aws.bulletPosition        = bulletPosition;
        aws.shootForce            = shootForce;
        aws.recoilVertical        = recoilVertical;
        aws.recoilHorizontal      = recoilHorizontal;
        aws.recoilSpeedMax        = recoilSpeedMax;
        aws.muzzleFlashManager    = muzzleFlashManager;
    }
Example #2
0
    public GameObject muzzleFlashManager;    //the muzzle flash manager object

    public void GetVariablesFromWeapon()
    {
        AIWeaponSelected ais = GetComponent <AIWeaponSelected>();
        AIWeaponShoot    aws = GetComponent <AIWeaponShoot>();

        ammoCurrent           = ais.ammoCurrent;
        ammoInNewMagazine     = ais.ammoInNewMagazine;
        magazines             = ais.magazines;
        rateOfFire            = ais.rateOfFire;
        secondsToReload       = ais.secondsToReload;
        magazineObjectThrow   = ais.magazineObjectThrow;
        throwForce            = ais.throwForce;
        magazineThrowPosition = ais.magazineThrowPosition;
        ikLeftHand            = ais.ikLeftHand;
        ikRightHand           = ais.ikRightHand;
        bulletToUse           = aws.bulletToUse;
        bulletPosition        = aws.bulletPosition;
        shootForce            = aws.shootForce;
        recoilVertical        = aws.recoilVertical;
        recoilHorizontal      = aws.recoilHorizontal;
        recoilSpeedMax        = aws.recoilSpeedMax;
        muzzleFlashManager    = aws.muzzleFlashManager;
    }
Example #3
0
 void Awake()
 {
     weapon = transform.parent.GetComponent <AIWeaponController>().weaponHoldingObject.GetComponent <AIWeaponSelected>();
 }
Example #4
0
	void Awake()
	{
		weapon = transform.parent.GetComponent<AIWeaponController>().weaponHoldingObject.GetComponent<AIWeaponSelected>();
	}