//override public void ConfigureBullet(BaseBullet m_bullet) //{ // m_RateOfFire = 0.3f; // m_bullet.ChangeScale (0.2f); // m_bullet.b_bulletSpeed = 5.0f; //} public override void FireBullets(int p_sides, float p_PlayerRot, Vector3 FiringPos, BaseBulletPool p_bulletPool) { //TimMethodOfFiring ( p_sides, p_PlayerRot, FiringPos, p_bulletPool); }
//public PlayerBulletPool m_bulletPool; // public float RateOfFire { // get { // return m_RateOfFire; // } // } //protected void TimMethodOfFiring (int p_sides, float p_PlayerRot, Vector3 FiringPos, BaseBulletPool m_bulletPool) //{ // //calculate the incremental angle from the number of sides given // float increment = 360 / p_sides; // //this loop will only fire for every side // for (int i = 0; i < 360; i += (int)increment) { // float iAngle = i; // GameObject BulletGameObject = m_bulletPool.GetBullet (true); // if (BulletGameObject != null) { // //set position to this object then, get component to set its position to this objects position // BulletGameObject.transform.position = FiringPos; // DefaultBullet b = BulletGameObject.GetComponent<DefaultBullet> (); // b.b_bulletPos = FiringPos; // ConfigureBullet (b); // //add the players angle as well as the angle calculated // iAngle += p_PlayerRot; // if (iAngle > 360) { // iAngle -= 360; // } // float radAngle = iAngle * (Mathf.PI / 180); // b.b_direction = new Vector2 ((float)Mathf.Sin (radAngle), (float)Mathf.Cos (radAngle)); // b.b_direction.Normalize (); // } // } //} //public virtual void ConfigureBullet(BaseBullet m_bullet){} public virtual void FireBullets(int p_sides, float p_PlayerRot, Vector3 FiringPos, BaseBulletPool p_bulletPool) { }