Ejemplo n.º 1
0
        public static bool Prefix(MissedNoteEffectSpawner __instance, Vector3 pos, NoteController noteController, NoteCutInfo noteCutInfo, ref BombExplosionEffect ____bombExplosionEffect, ref FlyingSpriteSpawner ____failFlyingSpriteSpawner, ref ShockwaveEffect ____shockwaveEffect)
        {
            if (!Plugin.active)
            {
                return(true);
            }

            FlyingSpriteSpawnerPatch.lastNoteRotation    = noteController.transform.rotation;
            FlyingSpriteSpawnerPatch.lastNoteRotationSet = true;
            Vector3 pos2 = Quaternion.Inverse(FlyingSpriteSpawnerPatch.lastNoteRotation) * pos;

            ____failFlyingSpriteSpawner.SpawnFlyingSprite(pos2);
            ____bombExplosionEffect.SpawnExplosion(pos);
            Vector3 pos3 = pos;

            pos3.y = 0.01f;
            ____shockwaveEffect.SpawnShockwave(pos3);

            return(false);
        }
Ejemplo n.º 2
0
        public static bool Prefix(Vector3 pos, NoteController noteController, NoteCutInfo noteCutInfo, ref ColorManager ____colorManager, ref NoteCutParticlesEffect ____noteCutParticlesEffect, ref bool ____spawnScores, ref ScoreController ____scoreController, ref FlyingScoreSpawner ____flyingScoreSpawner, ref ShockwaveEffect ____shockwaveEffect, ref FlyingSpriteSpawner ____failFlyingSpriteSpawner, ref NoteDebrisSpawner ____noteDebrisSpawner)
        {
            if (!Plugin.active)
            {
                return(true);
            }

            if (noteCutInfo.allIsOK)
            {
                NoteData noteData = noteController.noteData;
                Color    color    = ____colorManager.ColorForNoteType(noteData.noteType).ColorWithAlpha(0.5f);
                ____noteCutParticlesEffect.SpawnParticles(pos, noteCutInfo.cutNormal, noteCutInfo.saberDir, color, 150, 50, Mathf.Clamp(noteData.timeToNextBasicNote, 0.4f, 1f), noteCutInfo.saberType);

                if (____spawnScores)
                {
                    int multiplierWithFever = ____scoreController.multiplierWithFever;
                    FlyingScoreSpawnerPatch.lastNoteRotation    = noteController.transform.rotation;
                    FlyingScoreSpawnerPatch.lastNoteRotationSet = true;
                    Vector3 pos2 = Quaternion.Inverse(FlyingSpriteSpawnerPatch.lastNoteRotation) * pos;
                    ____flyingScoreSpawner.SpawnFlyingScore(noteCutInfo, noteData.lineIndex, multiplierWithFever, pos2, new Color(0.8f, 0.8f, 0.8f));
                }
                Vector3 pos3 = pos;
                pos3.y = 0.01f;
                ____shockwaveEffect.SpawnShockwave(pos3);
            }
            else
            {
                FlyingSpriteSpawnerPatch.lastNoteRotation    = noteController.transform.rotation;
                FlyingSpriteSpawnerPatch.lastNoteRotationSet = true;
                Vector3 pos4 = Quaternion.Inverse(FlyingSpriteSpawnerPatch.lastNoteRotation) * pos;
                ____failFlyingSpriteSpawner.SpawnFlyingSprite(pos4);
            }
            ____noteDebrisSpawner.SpawnDebris(noteCutInfo, noteController);

            return(false);
        }