static StackObject *set_clip_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AudioClip @value = (UnityEngine.AudioClip) typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.AudioSource instance_of_this_method = (UnityEngine.AudioSource) typeof(UnityEngine.AudioSource).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.clip = value;

            return(__ret);
        }
        static StackObject *Add_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AudioSource @item = (UnityEngine.AudioSource) typeof(UnityEngine.AudioSource).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Collections.Generic.List <UnityEngine.AudioSource> instance_of_this_method = (System.Collections.Generic.List <UnityEngine.AudioSource>) typeof(System.Collections.Generic.List <UnityEngine.AudioSource>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Add(@item);

            return(__ret);
        }
Exemplo n.º 3
0
        /** constructor
         */
        public UnityAudioSource(UnityEngine.AudioSource a_audiosoucne, Volume a_volume)
        {
            //raw
            this.raw = a_audiosoucne;

            //volume
            this.volume = a_volume;

            //volume_data
            this.volume_data = 0.0f;

            //volume_oparation
            this.volume_operation = 1.0f;

            if (this.raw != null)
            {
                this.raw.playOnAwake = false;
                this.raw.loop        = false;
                this.raw.volume      = 0.0f;
            }
        }
Exemplo n.º 4
0
        /** 初期化。
         */
        public void Initialize(Volume a_volume_master, Volume a_volume_se)
        {
            //volume_master
            this.volume_master = a_volume_master;

            //volume_se
            this.volume_se = a_volume_se;

            //myaudiosource
            this.myaudiosource             = this.GetComponent <UnityEngine.AudioSource>();
            this.myaudiosource.playOnAwake = false;
            this.myaudiosource.volume      = this.volume_master.GetVolume() * this.volume_se.GetVolume();

            //bank_list
            this.bank_list = new System.Collections.Generic.Dictionary <long, Bank>();

            //load
            this.load_worklist = new System.Collections.Generic.List <Bank>();

            //unload
            this.unload_worklist = new System.Collections.Generic.List <Bank>();
        }
Exemplo n.º 5
0
        static int _m_FreeAudioSource(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Casinos.CasinosContext gen_to_be_invoked = (Casinos.CasinosContext)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.AudioSource _audio_src = (UnityEngine.AudioSource)translator.GetObject(L, 2, typeof(UnityEngine.AudioSource));

                    gen_to_be_invoked.FreeAudioSource(_audio_src);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 6
0
        static int _m_PlayStepAutio(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Minecraft.BlocksData.Block gen_to_be_invoked = (Minecraft.BlocksData.Block)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.AudioSource _source = (UnityEngine.AudioSource)translator.GetObject(L, 2, typeof(UnityEngine.AudioSource));

                    gen_to_be_invoked.PlayStepAutio(_source);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 7
0
		public override object WriteTo(object obj, System.Collections.Generic.Dictionary<long, UnityEngine.Object> objects)
		{
			obj = base.WriteTo(obj, objects);
			if(obj == null)
			{
				return null;
			}
			UnityEngine.AudioSource o = (UnityEngine.AudioSource)obj;
			o.volume = volume;
			o.pitch = pitch;
			o.time = time;
			o.timeSamples = timeSamples;
			o.clip = (UnityEngine.AudioClip)objects.Get(clip);
			o.outputAudioMixerGroup = (UnityEngine.Audio.AudioMixerGroup)objects.Get(outputAudioMixerGroup);
			o.loop = loop;
			o.ignoreListenerVolume = ignoreListenerVolume;
			o.playOnAwake = playOnAwake;
			o.ignoreListenerPause = ignoreListenerPause;
			o.velocityUpdateMode = (UnityEngine.AudioVelocityUpdateMode)velocityUpdateMode;
			o.panStereo = panStereo;
			o.spatialBlend = spatialBlend;
			o.spatialize = spatialize;
			o.spatializePostEffects = spatializePostEffects;
			o.reverbZoneMix = reverbZoneMix;
			o.bypassEffects = bypassEffects;
			o.bypassListenerEffects = bypassListenerEffects;
			o.bypassReverbZones = bypassReverbZones;
			o.dopplerLevel = dopplerLevel;
			o.spread = spread;
			o.priority = priority;
			o.mute = mute;
			o.minDistance = minDistance;
			o.maxDistance = maxDistance;
			o.rolloffMode = (UnityEngine.AudioRolloffMode)rolloffMode;
			return o;
		}
 public static TARGET pitchTransition(this TARGET target, float value, float duration, LeanEase ease = LeanEase.Smooth)
 {
     Method.LeanAudioSourcePitch.Register(target, value, duration, ease); return(target);
 }
Exemplo n.º 9
0
 protected override void OnCreate()
 {
     //Assuming there is only 1 audio source in the whole game
     this.audioSourceGameObject = UnityEngine.Object.FindObjectOfType <UnityEngine.AudioSource>();
 }
Exemplo n.º 10
0
    public void ReplaceDrivableBody(UnityEngine.Rigidbody2D newBody, bool newHorizontalEnabled, bool newVerticalEnabled, UnityEngine.Vector2 newForce, float newImpulseMultiplier, float newRelativeImpulseMultiplier, UnityEngine.AudioSource newImpulseSound)
    {
        var index     = GameComponentsLookup.DrivableBody;
        var component = CreateComponent <DrivableBodyComponent>(index);

        component.body = newBody;
        component.horizontalEnabled         = newHorizontalEnabled;
        component.verticalEnabled           = newVerticalEnabled;
        component.force                     = newForce;
        component.impulseMultiplier         = newImpulseMultiplier;
        component.relativeImpulseMultiplier = newRelativeImpulseMultiplier;
        component.impulseSound              = newImpulseSound;
        ReplaceComponent(index, component);
    }