ProjectStorms.Countermeasures.SpawnPinwheel C# (CSharp) Method

SpawnPinwheel() public method

public SpawnPinwheel ( ) : void
return void
        void SpawnPinwheel()
        {
            //Spawn offset
            Vector3 localOffset = new Vector3 (-10, 7.5f, 0);
            Vector3 worldOffset = m_trans.rotation * localOffset;
            Vector3 spawnPos = m_trans.position + worldOffset;

            for (int i = 0; i < pinwheels.Count; i++)
            {
                if (!pinwheels[i].activeInHierarchy)
                {
                    // Rumble the controller
                    InputManager.SetControllerVibrate(gameObject.tag, 0.3f, 0.3f, 0.2f, false);

                    // Go on cooldown
                    pinwheelCooldown = powerUpCooldown;

                    pinwheels[i].transform.position = spawnPos;
                    pinwheels[i].transform.rotation = m_trans.rotation;
                    pinwheels[i].SetActive(true);
                    //break the loop
                    break;
                }
            }
        }