コード例 #1
0
ファイル: VOExample.cs プロジェクト: neoRiley/XLSound_unity
 public virtual void OnMouseUpAsButton()
 {
     XLSound.PlayVOSound(Sounds.AttractVO_havingAGoodDay_v1, (VOPositions pos) =>
     {
         L.Log(LogEventType.EVENT, $"VO event: {pos}");
         renderer.enabled = true;
         renderer.sharedMaterial.mainTexture = voImages[pos];
     }, () =>
     {
         L.Log(LogEventType.STRING, $"VO Completed");
         //renderer.enabled = false;
     });
 }
コード例 #2
0
    protected void CreateVOTap()
    {
        GameObject t        = GameObject.FindGameObjectWithTag("BlastDoor");
        var        collider = t.AddComponent <SphereCollider>();

        collider.center = Vector3.zero;
        var lHandler = t.AddComponent <TurbineClickHandler>();

        lHandler.OnTap += (GameObject obj) =>
        {
            XLSound.PlayVOSound(Sounds.AttractVO_heyDoIKnowYouFromSomewhere_v1, (VOPositions pos) =>
            {
                L.Log(LogEventType.EVENT, $"VO event: {pos}");
            }, () =>
            {
                L.Log(LogEventType.STRING, $"VO Completed");
            });
        };
    }