Esempio n. 1
0
 public void Pause(bool pause)
 {
     if (pauseEvent.IsValid() && resumeEvent.IsValid())
     {
         if (pause)
         {
             AkSoundEngine.PostEvent(pauseEvent.Id, gameObject);
         }
         else
         {
             AkSoundEngine.PostEvent(resumeEvent.Id, gameObject);
         }
     }
     else
     {
         Debug.LogError((!pauseEvent.IsValid() ? "Pause event not valid" : "") + (!resumeEvent.IsValid() ? "Resume event not valid" : "") + " fallback technique : mute all instr");
         foreach (InstruData instr in listInstru)
         {
             if (pause)
             {
                 AkSoundEngine.PostEvent(instr.nameEventMute.Id, gameObject);
             }
             else
             {
                 if (instr.on)
                 {
                     AkSoundEngine.PostEvent(instr.nameEventUnMute.Id, gameObject);
                 }
             }
         }
     }
 }
Esempio n. 2
0
 public void PlayButtonSound()
 {
     if (clickEvent.IsValid())
     {
         AkSoundEngine.PostEvent(clickEvent.Id, this.gameObject);
     }
 }
Esempio n. 3
0
 public void OnPushPlay()
 {
     //need to have a little animation / glitch here before launching (load in a dark screen would be perfect)
     if (launchGameEvent.IsValid())
     {
         AkSoundEngine.PostEvent(launchGameEvent.Id, this.gameObject);
     }
     //TO DO : suppr ça !
     AkSoundEngine.StopAll();
     SceneManager.LoadScene("FirstCompo");
 }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        dateText.text = DateTime.Now.ToString().Substring(0, 6) + "19??";

        if (startEvent.IsValid())
        {
            AkSoundEngine.PostEvent(startEvent.Id, this.gameObject);
        }

        ChangeYesNo();
    }
    // Use this for initialization
    void Start()
    {
        coolDown = initTime;
        position = transform.position;

        if (startEvent.IsValid() && stopEvent.IsValid())
        {
            /*
             * if (allowMultiPosition)
             *  SoundPointManager.Instance.AddSoundPoint(gameObject);
             * else
             *  startEvent.Post(gameObject);
             */
            StartCoroutine("InitSoundPoint");
        }
    }