// 右手のshot void shot() { // velocityAveがshotNum以上になったら発射 if (velocityAveRight >= shotNum && bulletRightClone != null && common.bulletFireRight == false /*&& shotDirectionRight.z > 0*/) { common.bulletFireRight = true; gauge_right.SetActive(true); if (shineFlag == false) { // 飛ばす方向の補正 if (shotDirectionRight.y <= -0.1) { shotDirectionRight.y = 0; } bulletRightClone.GetComponent <Rigidbody>().AddForce(shotDirectionRight * speed); bulletRightClone.transform.parent = bulletBox.transform; } if (shineFlag == true) { Extend_collider scaleScript = bulletRightClone.GetComponent <Extend_collider>(); scaleScript.ScaleUpStart_right(); } _MagicMix.LeftRevival(); } }
// 左手のshot void shotL() { // 左手のvelocityLAveがshotNum以上になったら発射 if (velocityAveLeft >= shotNum && bulletLeftClone != null && common.bulletFireLeft == false /*&& shotDirectionLeft.z > 0*/) { common.bulletFireLeft = true; gauge_left.SetActive(true); if (shineFlag_left == false) { // 飛ばす方向の補正 if (shotDirectionLeft.y <= -0.1) { shotDirectionLeft.y = 0; } bulletLeftClone.GetComponent <Rigidbody>().AddForce(shotDirectionLeft * speed); bulletLeftClone.transform.parent = bulletBox.transform; } if (shineFlag_left == true) { Extend_collider scaleScript = bulletLeftClone.GetComponent <Extend_collider>(); scaleScript.ScaleUpStart_left(); } } }