Exemplo n.º 1
0
        private void SetData(out TriggerData data, AnimationClip anim, AudioClipProvider audio, ViveObjectProps objectProps = null, bool objectIsConsumed = false)
        {
            data = new TriggerData(anim, audio, objectProps, objectIsConsumed);
            if (anim != null)
            {
                this.SafeGetComponent(ref _playObject);

                data.Setup(_playObject);
            }

            if (audio != null)
            {
                this.SafeGetComponent(ref _audioSource);
            }

            if (objectProps != null)
            {
                this.SafeGetComponent(ref _objectProps);
            }
        }