Exemplo n.º 1
0
 private static void Postfix(SaberClashEffect __instance, ParticleSystem ____sparkleParticleSystem, ParticleSystem ____glowParticleSystem, ColorManager ____colorManager)
 {
     __instance.gameObject.AddComponent <ChromaClashEffectController>().Init(____sparkleParticleSystem, ____glowParticleSystem, ____colorManager);
 }
Exemplo n.º 2
0
 static bool Prefix(SaberClashChecker ____saberClashChecker, HapticFeedbackController ____hapticFeedbackController, ref SaberClashEffect __instance, ParticleSystem ____glowParticleSystem, ref ParticleSystem.EmissionModule ____sparkleParticleSystemEmmisionModule, ref ParticleSystem.EmissionModule ____glowParticleSystemEmmisionModule, ref bool ____sabersAreClashing)
 {
     if (!PluginConfig.saberClash && PluginConfig.enabled)
     {
         if (____saberClashChecker.sabersAreClashing)
         {
             __instance.transform.position = ____saberClashChecker.clashingPoint;
             // ____hapticFeedbackController.ContinuousRumble(XRNode.LeftHand);
             // ____hapticFeedbackController.ContinuousRumble(XRNode.RightHand);
             if (!____sabersAreClashing)
             {
                 ____sabersAreClashing = true;
                 ____sparkleParticleSystemEmmisionModule.enabled = true;
                 ____glowParticleSystemEmmisionModule.enabled    = true;
                 return(true);
             }
         }
         else if (____sabersAreClashing)
         {
             ____sabersAreClashing = false;
             ____sparkleParticleSystemEmmisionModule.enabled = false;
             ____glowParticleSystemEmmisionModule.enabled    = false;
             ____glowParticleSystem.Clear();
         }
         return(false);
     }
     else
     {
         return(true);
     }
 }