Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if(component == null)
        {
            component = Fabric.FabricManager.Instance.GetComponentByName("Audio_Fabric_SFX_Test") as Fabric.AudioComponent;

            component.Volume = 0.0f;
        }
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (component == null)
        {
            component = Fabric.FabricManager.Instance.GetComponentByName("Audio_Fabric_SFX_Test") as Fabric.AudioComponent;

            component.Volume = 0.0f;
        }
    }
        void Update()
        {
            if (fabricComponent == null)
            {
                fabricComponent = Fabric.FabricManager.Instance.GetComponentByName("FabricAudioManger_Sfx_UI_Win") as Fabric.AudioComponent;

                // fabricComponent.Volume = 0.5f;
                //fabricComponent.Loop = true;
                //var associatedAudioClip = fabricComponent.AudioClip;
                //Debug.Log(associatedAudioClip.length);
            }



            //Fabric.Component[] components = Fabric.FabricManager.Instance.GetComponentsByName(MyEventName, LEDs[0]);

            //if (components != null && components.Length > 0) {
            //    components[0].Volume = 0.5f;

            //    if (components[0].IsPlaying() == true) {
            //        Debug.Log("Component is playing");
            //    }
            //}


            if (Fabric.EventManager.Instance.IsEventActive(MyEventName, LEDs[0]))
            {
                LEDs[0].SetActive(true);
            }
            else
            {
                LEDs[0].SetActive(false);
            }
            if (Fabric.EventManager.Instance.IsEventActive(MyEventName, LEDs[1]))
            {
                LEDs[1].SetActive(true);
            }
            else
            {
                LEDs[1].SetActive(false);
            }
        }