void ShootRight() { Sound.Play(); GameObject bulletGO = (GameObject)Instantiate(bulletPrefabe, firePoint2.position, firePoint2.rotation); BulletSc bulletSc = bulletGO.GetComponent <BulletSc> (); if (bulletSc != null) { bulletSc.Seek(target); } }
void ShootLeft() { //Debug.Log ("Shoot"); GameObject bulletGO = (GameObject)Instantiate(bulletPrefabe, firePoint1.position, firePoint1.rotation); //GameObject bulletGO2 = (GameObject) Instantiate(bulletPrefabe,firePoints[2].position,firePoints[2].rotation); BulletSc bulletSc = bulletGO.GetComponent <BulletSc> (); //BulletSc bulletSc2 = bulletGO2.GetComponent<BulletSc> (); if (bulletSc != null) { bulletSc.Seek(target); } /*if(bulletSc2 != null) * { * bulletSc2.Seek (target); * }*/ }