Exemplo n.º 1
0
        public bool SourceHasChanged()
        {
            bool hasChanged = false;

            if (spatialize)
            {
                hasChanged = true;
                spatialize = false;
            }
            else if (Source != null)
            {
                if (pureData.listener.transform.hasChanged)
                {
                    pureData.SetTransformHasChanged(pureData.listener.transform, false);
                    spatialize = true;
                    hasChanged = true;
                }

                if (Source.transform.hasChanged)
                {
                    pureData.SetTransformHasChanged(Source.transform, false);
                    spatialize = true;
                    hasChanged = true;
                }
            }

            return(hasChanged);
        }
        public virtual bool SourceHasChanged()
        {
            bool hasChanged = false;

            if (spatialize)
            {
                hasChanged = true;
                spatialize = false;
            }

            if (Source != null && Source != pureData.listener && pureData.listener.transform.hasChanged)
            {
                pureData.SetTransformHasChanged(pureData.listener.transform, false);
                spatialize = true;
                hasChanged = true;
            }

            if (Source as Transform != null && ((Transform)Source).hasChanged)
            {
                pureData.SetTransformHasChanged(((Transform)Source), false);
                spatialize = true;
                hasChanged = true;
            }

            return(hasChanged);
        }