Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public override void Initialize(GameObject obj)
 {
     launcher = obj.GetComponent <ProjectileTriggerable> ();
 }