示例#1
0
        /////////////////////////////////////////
        //Custom version
//    private IEnumerator OnLoad(On.RoR2.RoR2Application.orig_OnLoad orig, RoR2.RoR2Application self)
//    {
//      IEnumerator num = orig(self);
//
//      //Creates IntPtr of sufficient size.
//      IntPtr Memory = Marshal.AllocHGlobal(bytes.Length);
//      //copies the byte array to the IntPtr
//      Marshal.Copy(bytes, 0, Memory, bytes.Length);
//
//      //Loads the entire IntPtr as a bank
//      var result = AkSoundEngine.LoadBank(Memory, (uint)bytes.Length, out BankID);
//      if (result != AKRESULT.AK_Success)
//      {
//        Debug.LogError("Risk of Rave SoundBank failed to to load with result " + result);
//      }
//
//      //num.MoveNext();
//      return num;
//    }
        //Custom version
        /////////////////////////////////////////


        private void EndRaveTest(On.RoR2.HoldoutZoneController.orig_OnDisable orig, RoR2.HoldoutZoneController self)
        {
            EndRave();
            orig(self);

            Hodl = null;
        }
示例#2
0
 void EndRave()
 {
     Hodl = null;
     //Play music
     if (MusicCon)
     {
         Debug.Log("Try Stop");
         //uint test = RoR2.Util.PlaySound("RaveStop", MusicCon.gameObject);
         uint test = AkSoundEngine.PostEvent("RaveStop", MusicCon.gameObject);
         Debug.Log("code: " + test);
     }
     RaveTintImg.color = new Color(1, 1, 1, 0);
     Debug.Log("End Conductor");
     conductor.stopConductor();
     lastBeat = 0;
 }
示例#3
0
        private void StartRave(On.RoR2.HoldoutZoneController.orig_Start orig, RoR2.HoldoutZoneController self)
        {
            orig(self);
//      Debug.Log("Start Conductor");
            //spawn the rave prefabs

            //Play music
            if (MusicCon)
            {
//        Debug.Log("Try play");
                //uint test = RoR2.Util.PlaySound("RaveStart", MusicCon.gameObject);
                uint test = AkSoundEngine.PostEvent("RaveStart", MusicCon.gameObject);
                //        Debug.Log("code: " + test);
            }
            conductor.startConductor();
        }
示例#4
0
 private void EndRaveChargedHoldout(On.RoR2.HoldoutZoneController.orig_FullyChargeHoldoutZone orig, RoR2.HoldoutZoneController self)
 {
     EndRave();
     orig(self);
 }