Exemplo n.º 1
0
    //----------------------------------------------------------------------------------------------------
    /// <summary>
    /// SEを再生
    /// </summary>
    /// <param name="Se">サウンドエフェクト</param>
    /// <param name="isSe3D">3DのSEか</param>
    /// <param name="posX">Xの位置</param>
    /// <param name="posY">Yの位置</param>
    /// <param name="posZ">Zの位置</param>
    public void Play(SeCollection Se, bool isSe3D = false, float posX = 0, float posY = 0, float posZ = 0)
    {
        if (m_isSe)
        {
            //2DのSEか3DのSEか
            if (!isSe3D)
            {
                m_workAudioSource = Se2DAudioSource;
            }
            else
            {
                //音切れ防止
                m_workAudioSource    = Se3DAudioSources[m_se3DAudioSourceNum];
                m_se3DAudioSourceNum = (m_se3DAudioSourceNum + 1) % Se3DAudioSources.Length;
            }

            //位置
            m_workVector3.Set(posX, posY, posZ);
            m_workAudioSource.transform.position = m_workVector3;

            //SEの設定
            m_workAudioSource.clip = Ses[(int)Se];

            //再生
            m_workAudioSource.Play();
        }
    }
Exemplo n.º 2
0
    //----------------------------------------------------------------------------------------------------
    /// <summary>
    /// SEを再生
    /// </summary>
    /// <param name="Se">サウンドエフェクト</param>
    /// <param name="isSe3D">3DのSEか</param>
    /// <param name="isSpecial">特別か</param>
    /// <param name="pos">位置</param>
    public void Play(SeCollection Se, bool isSe3D = false, bool isSpecial = false, Vector3?pos = null)
    {
        if (m_isSe)
        {
            //2DのSEか3DのSEか
            if (!isSe3D)
            {
                m_workAudioSource = Se2DAudioSource;
            }
            else
            {
                if (isSpecial)
                {
                    //特別なSE番号の検索
                    for (m_workInt = 0; m_workInt < m_specialSeNum.Length; m_workInt++)
                    {
                        //未使用オーディオソース
                        if (m_specialSeNum[m_workInt] == -1)
                        {
                            m_specialSeNum[m_workInt] = (int)Se;
                        }

                        //特別なSEのオーディオソース発見
                        if (m_specialSeNum[m_workInt] == (int)Se)
                        {
                            m_workAudioSource = SpecialSe3DAudioSources[m_workInt];
                            break;
                        }
                    }
                }
                else
                {
                    //音切れ防止
                    m_workAudioSource    = Se3DAudioSources[m_se3DAudioSourceNum];
                    m_se3DAudioSourceNum = (m_se3DAudioSourceNum + 1) % Se3DAudioSources.Length;
                }
            }

            //位置
            pos = (pos == null) ? Vector3.zero : pos;
            m_workAudioSource.transform.position = (Vector3)pos;

            //SEの設定
            m_workAudioSource.clip = Ses[(int)Se];

            //再生
            if (!isSpecial || !m_workAudioSource.isPlaying)
            {
                m_workAudioSource.Play();
            }
        }
    }
Exemplo n.º 3
0
public Loop2220E(X12Doc owningDoc, LoopEntity prev, LoopCollection parent):base(owningDoc, prev, parent){
ServiceLineInformation = new SvcCollection(this, nameof(ServiceLineInformation));
SegmentCollections.Add(ServiceLineInformation);
ServiceLineStatusInformation = new StcCollection(this, nameof(ServiceLineStatusInformation));
SegmentCollections.Add(ServiceLineStatusInformation);
ServiceLineItemIdentification = new RefCollection(this, nameof(ServiceLineItemIdentification));
SegmentCollections.Add(ServiceLineItemIdentification);
ServiceLineDate = new DtpCollection(this, nameof(ServiceLineDate));
SegmentCollections.Add(ServiceLineDate);
TransactionSetTrailer = new SeCollection(this, nameof(TransactionSetTrailer));
SegmentCollections.Add(TransactionSetTrailer);
 
}
Exemplo n.º 4
0
 public Loop2220E(LoopCollectionBase parent) : base(parent)
 {
     ServiceLineInformation = new SvcCollection(this, nameof(ServiceLineInformation));
     SegmentCollections.Add(ServiceLineInformation);
     ServiceLineStatusInformation = new StcCollection(this, nameof(ServiceLineStatusInformation));
     SegmentCollections.Add(ServiceLineStatusInformation);
     ServiceLineItemIdentification = new RefCollection(this, nameof(ServiceLineItemIdentification));
     SegmentCollections.Add(ServiceLineItemIdentification);
     ServiceLineDate = new DtpCollection(this, nameof(ServiceLineDate));
     SegmentCollections.Add(ServiceLineDate);
     TransactionSetTrailer = new SeCollection(this, nameof(TransactionSetTrailer));
     SegmentCollections.Add(TransactionSetTrailer);
 }