private void WeaponSwap() { var currentWep = weapon[currentWeaponIndex]; projectileTriggerable = GetComponent <ProjectileTriggerable>(); currentWeaponObj = PoolManager.Spawn(currentWep.wGameObject, weaponLocation.position, weaponLocation.rotation); currentWeaponObj.transform.SetParent(weaponLocation); weaponParameters = currentWeaponObj.GetComponent <WeaponParameters>(); currentWep.Initialize(gameObject); }
public override void Initialize(GameObject obj) { launcher = obj.GetComponent <ProjectileTriggerable> (); }