Beispiel #1
0
        public SettingsMemoryFxViewModel(FxType type, FxSlot slot, SettingsMemoryFxModel model)
            : base(model)
        {
            Type = type;
            Slot = slot;

            Filter        = new FxFilterViewModel(model);
            Phaser        = new FxPhaserViewModel(model);
            Flanger       = new FxFlangerViewModel(model);
            Synth         = new FxSynthViewModel(model);
            LoFi          = new FxLoFiViewModel(model);
            RingModulator = new FxRingModulatorViewModel(model);
            GuitarToBass  = new FxGuitarToBassViewModel(model);
            SlowGear      = new FxSlowGearViewModel(model);
            Transpose     = new FxTransposeViewModel(model);
            PitchBend     = new FxPitchBendViewModel(model);
            Robot         = new FxRobotViewModel(model);
            VocalDist     = new FxVocalDistViewModel(model);
            Dynamics      = new FxDynamicsViewModel(model);
            Eq            = new FxEqViewModel(model);
            Isolator      = new FxIsolatorViewModel(model);
            Octave        = new FxOctaveViewModel(model);
            Pan           = new FxPanViewModel(model);
            Tremolo       = new FxTremoloViewModel(model);
            Slicer        = new FxSlicerViewModel(model);
            Delay         = new FxDelayViewModel(model);
            PanningDelay  = new FxPanningDelayViewModel(model);
            TapeEcho      = new FxTapeEchoViewModel(model);
            GranularDelay = new FxGranularDelayViewModel(model);
            Roll          = new FxRollViewModel(model);
            Chorus        = new FxChorusViewModel(model);
            Reverb        = new FxReverbViewModel(model);
        }
Beispiel #2
0
    bool CanCreateFx(FxType hisType)
    {
        bool canCreateFx = false;

        foreach (FxGameObject fxGameObject in FXGameObjectList)
        {
            // Check if tag name exist
            if (fxGameObject.fxType == hisType)
            {
                canCreateFx = true;

                // Check if gameobject exist
                if (fxGameObject.fxGameObject == null)
                {
                    Debug.LogWarning("Can't find FX object !");
                    return(false);
                }
                else
                {
                    FxGameObjectStocked = fxGameObject;
                }
            }
        }
        return(canCreateFx);
    }
 public void PlayFx(FxType fx)
 {
     if (fx == FxType.Click)
     {
         FxClick.Play();
     }
     if (fx == FxType.Swipe)
     {
         FxSwipe.Play();
     }
     if (fx == FxType.Armonica)
     {
         FxArmonica.Play();
     }
     if (fx == FxType.Snoring)
     {
         FxSnoring.Play();
     }
     if (fx == FxType.Bip)
     {
         FxBip.Play();
     }
     if (fx == FxType.Pop)
     {
         FxPop.Play();
     }
 }
 public override void Reset()
 {
     gameObject          = null;
     useOverlapSphere    = true;
     gravity             = 6.25f;
     useOrbit            = false;
     overlapSphereSize   = 50;
     forceMultiplierTemp = 2;
     layerFilterOn       = false;
     layer                 = 0;
     disableGravity        = false;
     updateSelect          = UpdateType.FixedUpdate;
     forceType             = ForceType.None;
     orbitType             = OrbitType.normal;
     useSpeedVelocity      = false;
     setSpeedVelocity      = 500f;
     useAddForceAtPosition = false;
     useAddTorque          = false;
     torqueAmount          = 0;
     orbitOffset           = 20f;
     orbitSpeed            = 20f;
     useFx                 = false;
     fxSpeed               = 0;
     fxType                = FxType.Impulse;
     onlyUseFx             = false;
 }
Beispiel #5
0
        public GameObject SpawnFXFromPool(FxType FXType, Vector3 position, Quaternion rotation)
        {
            if (!m_FxPoolDictionary.ContainsKey(FXType))
            {
                Debug.LogError("Pool of " + FXType + " dosen't exist.");
                return(null);
            }

            if (m_FxPoolDictionary[FXType].Count == 0)
            {
                Debug.LogError(FXType.ToString() + " pool is empty!");
                return(null);
            }

            GameObject objectToSpawn = m_FxPoolDictionary[FXType].Dequeue();

            objectToSpawn.transform.position = position;
            objectToSpawn.transform.rotation = rotation;
            objectToSpawn.SetActive(true);

            PoolTracker poolTracker = AddPoolTrackerComponent(objectToSpawn, PoolType.FxType);

            poolTracker.FxType = FXType;
            m_TrackedObject.Enqueue(poolTracker);

            return(objectToSpawn);
        }
Beispiel #6
0
    private static void ProcessType(FxRedist redist, MemberDeclarationSyntax syntax, SemanticModel typeModel, string currentNamespace, ReportWriter reportWriter)
    {
        ISymbol symbol = typeModel.GetDeclaredSymbol(syntax);
        string  typeId = symbol.GetDocumentationCommentId();

        var typeName = typeId.Substring(2);

        if (FxdacSyntaxRewriter.s_ShouldRemoveType(typeName))
        {
            reportWriter.WriteListItem("Removed type {0}", symbol.Name);
            return;
        }
        FxAssembly typeAssembly = redist.GetAssemblyForType(typeId);

        if (typeAssembly.HasEmitedType(typeId))
        {
            return;
        }

        // rewrite type
        var rewriter = new FxdacSyntaxRewriter(reportWriter, typeModel, typeAssembly.Name);

        syntax = (MemberDeclarationSyntax)syntax.Accept(rewriter);

        // add type to assembly
        var typeSyntax = new FxType()
        {
            Declaration = syntax, Symbol = (ITypeSymbol)symbol
        };

        typeAssembly.AddType(currentNamespace, typeSyntax);
    }
Beispiel #7
0
	public PlayerFxDatum(float delay, string path, Vector3 position, Vector3 euler, FxType fxType)
	{
		this.delay = delay;
		this.prefabPath = path;
		this.pos = position;
		this.rot = euler;
		this.fxType = fxType;
	}
Beispiel #8
0
    public void Die(FxType type = FxType.None)
    {
        if (PhotonNetwork.IsMasterClient == false)
        {
            return;
        }

        Fx.CreateAll(type, transform.position + new Vector3(0, 0.5f, 0));
        photonView.RPC(nameof(RpcDie), RpcTarget.All);
    }
Beispiel #9
0
    public static void CreateAll(FxType type, Vector3 position)
    {
        if (type == FxType.None)
        {
            return;
        }

        instance.photonView.RPC(
            nameof(RpcCreateFx), RpcTarget.All,
            type, position);
    }
Beispiel #10
0
    public GameObject SendFx(FxType myTypeFx, Vector3 position)
    {
        FxGameObject fxGameObject = GetFxGameObject(myTypeFx);

        if (fxGameObject != null)
        {
            GameObject newFx = Instantiate(fxGameObject.fxGameObject);
            newFx.transform.position = position + fxGameObject.offset;

            return(newFx);
        }
        return(null);
    }
Beispiel #11
0
 public FxEffect(FxType type, string strType)
 {
     this.type = type;
     if (defaultAttributes.ContainsKey(strType))
     {
         attributes = defaultAttributes[strType];
     }
     else
     {
         attributes = defaultAttributes["None"];
     }
     //throw new Exception("invalid FxType");
 }
Beispiel #12
0
    public void CreateFx(FxType myTypeFx, Vector3 position)
    {
        FxGameObject fxGameObject = GetFxGameObject(myTypeFx);

        if (fxGameObject != null)
        {
            if (fxGameObject.fxGameObject == null)
            {
                return;
            }

            GameObject newFx = Instantiate(fxGameObject.fxGameObject);
            newFx.transform.position = position + fxGameObject.offset;
        }
    }
Beispiel #13
0
    FxGameObject GetFxGameObject(FxType type)
    {
        FxGameObject fxGameObject = null;

        for (int i = 0; i < FXGameObjectList.Length; i++)
        {
            if (FXGameObjectList[i].fxType == type)
            {
                fxGameObject = FXGameObjectList[i];
                return(fxGameObject);
            }
        }

        return(fxGameObject);
    }
Beispiel #14
0
    public void CreateFxThrow(FxType myTypeFx, Vector3 position, Quaternion roration)
    {
        FxGameObject fxGameObject = GetFxGameObject(myTypeFx);

        if (fxGameObject != null)
        {
            GameObject newFx = Instantiate(fxGameObject.fxGameObject);
            newFx.transform.position = position + fxGameObject.offset;

            if (myTypeFx == FxType.discThrow)
            {
                // Change the rotation
                newFx.transform.position = position + fxGameObject.offset;
                var modifiedRotation = roration.eulerAngles;
                modifiedRotation = new Vector3(modifiedRotation.x, modifiedRotation.y - 90, modifiedRotation.z);

                newFx.transform.rotation = Quaternion.Euler(modifiedRotation);
            }
        }
    }
Beispiel #15
0
    private void RpcCreateFx(FxType type, Vector3 position)
    {
        GameObject fx = null;

        switch (type)
        {
        case FxType.Punch: fx = Punch; break;

        case FxType.SurfaceHit: fx = SurfaceHit; break;

        case FxType.StarExplosion: fx = StarExplosion; break;

        case FxType.Explosion: fx = Explosion; break;
        }

        if (fx != null)
        {
            Create(fx, position);
        }
    }
Beispiel #16
0
 public void ReturnFXToPool(FxType objectType, GameObject objectToReturn)
 {
     CheckPoolTrackerOnResetObject(objectToReturn);
     objectToReturn.SetActive(false);
     m_FxPoolDictionary[objectType].Enqueue(objectToReturn);
 }
            public int this[int type, int index] {
                get {
                    switch (type)
                    {
                    default:
                        return(-1);

                    case 0:                             // BT
                        return(index == 0 ? BT0 : index == 1 ? BT1 : index == 2 ? BT2 : BT3);

                    case 1:                             // FX
                        return(index == 0 ? FX0 : FX1);

                    case 2:                             // LZ
                        return(index == 0 ? Lazer0 : Lazer1);

                    case 3:                             // FxType
                        return(index == 0 ? (int)FxType0 : (int)FxType1);

                    case 4:                             // FxParam
                        return(index == 0 ? FxParam0 : FxParam1);
                    }
                }
                set {
                    switch (type)
                    {
                    case 0:                             // BT
                        if (index == 0)
                        {
                            BT0 = value;
                        }
                        else if (index == 1)
                        {
                            BT1 = value;
                        }
                        else if (index == 2)
                        {
                            BT2 = value;
                        }
                        else if (index == 3)
                        {
                            BT3 = value;
                        }
                        break;

                    case 1:                             // FX
                        if (index == 0)
                        {
                            FX0 = value;
                        }
                        else if (index == 1)
                        {
                            FX1 = value;
                        }
                        break;

                    case 2:                             // LZ
                        if (index == 0)
                        {
                            Lazer0 = value;
                        }
                        else if (index == 1)
                        {
                            Lazer1 = value;
                        }
                        break;

                    case 3:                             // FxType
                        if (index == 0)
                        {
                            FxType0 = (FxType)value;
                        }
                        else if (index == 1)
                        {
                            FxType1 = (FxType)value;
                        }
                        break;

                    case 4:                             // FxParam
                        if (index == 0)
                        {
                            FxParam0 = value;
                        }
                        else if (index == 1)
                        {
                            FxParam1 = value;
                        }
                        break;
                    }
                }
            }
        public static Beatmap KSM_to_Stager(string kMap)
        {
            if (string.IsNullOrEmpty(kMap))
            {
                return(null);
            }
            var sMap = new Beatmap()
            {
                CreatedTime = System.DateTime.Now.Ticks,
                BPM         = -1,
                Ratio       = 1.5f,
                Shift       = 0f,
                Level       = 1,
                Tag         = "KShootMania",
                Stages      =
                {
                    new Beatmap.Stage()
                    {
                        X         = 0.5f,
                        Y         = 0f,
                        Duration  = float.MaxValue,
                        Height    = 1.8f,
                        Rotation  = 0f,
                        Speed     = 0.6f,
                        Time      = 0f,
                        Width     = 0.618f,
                        Widths    = { },
                        Heights   = { },
                        Positions ={                 },
                        Rotations ={                 },
                    }, new Beatmap.Stage()
                    {
                        X         = 0.5f,
                        Y         = 0f,
                        Duration  = float.MaxValue,
                        Height    = 1.8f,
                        Rotation  = 0f,
                        Speed     = 0.6f,
                        Time      = 0f,
                        Width     = 0.618f,
                        Widths    = { },
                        Heights   = { },
                        Positions ={                 },
                        Rotations ={                 },
                    }, new Beatmap.Stage()
                    {
                        X         = 0.5f,
                        Y         = 0f,
                        Duration  = float.MaxValue,
                        Height    = 1.8f,
                        Rotation  = 0f,
                        Speed     = 0.6f,
                        Time      = 0f,
                        Width     = 0.618f,
                        Widths    = { },
                        Heights   = { },
                        Positions ={                 },
                        Rotations ={                 },
                    },
                },
                Tracks =
                {
                    // 0
                    new Beatmap.Track()
                    {
                        X          = 1f / 8f,
                        Width      = 0.25f,
                        Angle      = 45f,
                        StageIndex = 0,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 1
                    new Beatmap.Track()
                    {
                        X          = 3f / 8f,
                        Width      = 0.25f,
                        Angle      = 45f,
                        StageIndex = 0,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 2
                    new Beatmap.Track()
                    {
                        X          = 5f / 8f,
                        Width      = 0.25f,
                        Angle      = 45f,
                        StageIndex = 0,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 3
                    new Beatmap.Track()
                    {
                        X          = 7f / 8f,
                        Width      = 0.25f,
                        Angle      = 45f,
                        StageIndex = 0,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 4
                    new Beatmap.Track()
                    {
                        X          = 1f / 4f,
                        Width      = 0.5f,
                        Angle      = 45f,
                        StageIndex = 1,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 5
                    new Beatmap.Track()
                    {
                        X          = 3f / 4f,
                        Width      = 0.5f,
                        Angle      = 45f,
                        StageIndex = 1,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 0,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                    // 6
                    new Beatmap.Track()
                    {
                        X          = 0.5f,
                        Width      = 1f,
                        Angle      = 45f,
                        StageIndex = 2,
                        Time       = 0f,
                        Duration   = float.MaxValue,
                        Color      = 1,
                        HasTray    = false,
                        Speed      = 1f,
                        Colors     = { },
                        Xs         = { },
                        Angles     = { },
                        Widths     = { },
                    },
                },
                Notes   = { },
                Timings = { new Beatmap.Timing(0f, 1f) },
            };
            // String >> Cache
            float timeOffset = 0f;
            float currentBPM = 120f;
            var   strs       = kMap.Replace("\r\n", "\n").Split('\n');
            int   index      = 0;

            // Header
            for (; index < strs.Length; index++)
            {
                var str = strs[index];
                if (str.StartsWith("--"))
                {
                    break;
                }
                switch (str)
                {
                case var _ when str.StartsWith("//"):
                    break;

                case var _ when str.StartsWith("t="):
                    if (str.IndexOf('-') < 0)
                    {
                        if (float.TryParse(str.Substring(2), out float _bpm))
                        {
                            currentBPM = _bpm;
                            if (sMap.BPM < 0)
                            {
                                sMap.BPM = (int)_bpm;
                            }
                        }
                    }

                    break;

                case var _ when str.StartsWith("o="):
                    if (int.TryParse(str.Substring(2), out int _offset))
                    {
                        timeOffset = _offset / -1000f;
                    }

                    break;

                case var _ when str.StartsWith("level="):
                    if (int.TryParse(str.Substring(6), out int _level))
                    {
                        sMap.Level = _level;
                    }

                    break;
                }
            }
            // Chart
            float nextBeatAmount = 1f;
            var   chartCaches    = new List <ChartData>();
            float cacheTimeStart = 0f;
            var   longBtStarts   = new float[4] {
                -1f, -1f, -1f, -1f
            };
            var longFxStarts = new float[2] {
                -1f, -1f
            };
            var longSfxIndexs = new byte[2] {
                0, 0
            };
            var longSfxParams = new int[2] {
                0, 0
            };
            var prevLzIndex = new int[2] {
                -1, -1
            };
            var fxTypes = new FxType[2] {
                FxType.None, FxType.None
            };
            var fxParams = new int[2] {
                -1, -1
            };

            for (; index < strs.Length; index++)
            {
                var str = strs[index];
                switch (str)
                {
                case var _ when str.StartsWith("//"):
                    break;

                case var _ when str.StartsWith("t="):
                    if (str.IndexOf('-') < 0)
                    {
                        if (float.TryParse(str.Substring(2), out float _bpm))
                        {
                            currentBPM = _bpm;
                            if (sMap.BPM < 0)
                            {
                                sMap.BPM = (int)_bpm;
                            }
                        }
                    }

                    break;

                case var _ when str.StartsWith("beat="):
                    var str2 = str.Substring(5).Split('/');

                    if (str2 != null && str2.Length >= 2 && int.TryParse(str2[0], out int _b0) && int.TryParse(str2[1], out int _b1))
                    {
                        nextBeatAmount = (float)_b0 / _b1;
                    }
                    break;

                case var _ when str.Length >= 10 && str[4] == '|' && str[7] == '|':
                    chartCaches.Add(new ChartData()
                    {
                        BT0      = ChartData.Char_to_Int_BT(str[0]),
                        BT1      = ChartData.Char_to_Int_BT(str[1]),
                        BT2      = ChartData.Char_to_Int_BT(str[2]),
                        BT3      = ChartData.Char_to_Int_BT(str[3]),
                        FX0      = ChartData.Char_to_Int_FX(str[5]),
                        FX1      = ChartData.Char_to_Int_FX(str[6]),
                        Lazer0   = ChartData.Char_to_Int_LAZER(str[8]),
                        Lazer1   = ChartData.Char_to_Int_LAZER(str[9]),
                        FxType0  = fxTypes[0],
                        FxType1  = fxTypes[1],
                        FxParam0 = fxParams[0],
                        FxParam1 = fxParams[1],
                    });
                    fxTypes[0]  = fxTypes[1] = FxType.None;
                    fxParams[0] = fxParams[1] = -1;
                    break;

                case var _ when str.StartsWith("fx-l="):
                case var _ when str.StartsWith("fx-r="):
                    var _str = str.Substring(5);

                    int lrIndex = str[3] == 'l' ? 0 : 1;
                    switch (_str)
                    {
                    default:
                        fxTypes[lrIndex]  = FxType.None;
                        fxParams[lrIndex] = -1;
                        break;

                    case var _ when _str.StartsWith("Retrigger;"):
                        fxTypes[lrIndex] = FxType.Retrigger;

                        if (!int.TryParse(_str.Substring(10), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 8;
                        }
                        break;

                    case var _ when _str.StartsWith("Gate;"):
                        fxTypes[lrIndex] = FxType.Gate;

                        if (!int.TryParse(_str.Substring(5), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 4;
                        }
                        break;

                    case var _ when _str.StartsWith("Flanger"):
                        fxTypes[lrIndex] = FxType.Flanger;

                        fxParams[lrIndex] = -1;
                        break;

                    case var _ when _str.StartsWith("PitchShift;"):
                        fxTypes[lrIndex] = FxType.PitchShift;

                        if (!int.TryParse(_str.Substring(11), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 12;
                        }
                        break;

                    case var _ when _str.StartsWith("BitCrusher;"):
                        fxTypes[lrIndex] = FxType.BitCrusher;

                        if (!int.TryParse(_str.Substring(11), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 5;
                        }
                        break;

                    case var _ when _str.StartsWith("Phaser"):
                        fxTypes[lrIndex] = FxType.Phaser;

                        fxParams[lrIndex] = -1;
                        break;

                    case var _ when _str.StartsWith("Wobble;"):
                        fxTypes[lrIndex] = FxType.Wobble;

                        if (!int.TryParse(_str.Substring(7), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 12;
                        }
                        break;

                    case var _ when _str.StartsWith("TapeStop;"):
                        fxTypes[lrIndex] = FxType.TapeStop;

                        if (!int.TryParse(_str.Substring(9), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 50;
                        }
                        break;

                    case var _ when _str.StartsWith("Echo;"):
                        fxTypes[lrIndex] = FxType.Echo;

                        if (!int.TryParse(_str.Substring(5), out fxParams[lrIndex]))
                        {
                            fxParams[lrIndex] = 4;
                        }
                        break;

                    case var _ when _str.StartsWith("SideChain"):
                        fxTypes[lrIndex] = FxType.SideChain;

                        fxParams[lrIndex] = -1;
                        break;
                    }
                    break;

                case var _ when str.StartsWith("--"):
                    if (chartCaches.Count == 0)
                    {
                        break;
                    }

                    float cacheDuration = 60f / currentBPM * 4f * nextBeatAmount;
                    for (int i = 0; i < chartCaches.Count; i++)
                    {
                        var   cache = chartCaches[i];
                        float time  = cacheTimeStart + i / (chartCaches.Count - 1f) * cacheDuration + timeOffset;
                        // BT
                        for (int trackIndex = 0; trackIndex < 4; trackIndex++)
                        {
                            int  bt         = cache[0, trackIndex];
                            bool tryEndLong = bt != 2 || i == chartCaches.Count - 1;
                            if (bt == 1)
                            {
                                // BT Chip
                                sMap.Notes.Add(new Beatmap.Note()
                                {
                                    Time            = time,
                                    X               = 0.5f,
                                    Z               = 0f,
                                    Width           = 1f,
                                    ItemType        = (int)NoteType.BtChip,
                                    ClickSoundIndex = 0,
                                    Duration        = 0,
                                    LinkedNoteIndex = -1,
                                    TrackIndex      = trackIndex,
                                });
                            }
                            if (bt == 2)
                            {
                                // Start Long
                                if (longBtStarts[trackIndex] < 0f)
                                {
                                    longBtStarts[trackIndex] = time;
                                }
                            }
                            // End Long
                            if (tryEndLong && longBtStarts[trackIndex] >= 0f)
                            {
                                sMap.Notes.Add(new Beatmap.Note()
                                {
                                    Time            = longBtStarts[trackIndex],
                                    X               = 0.5f,
                                    Z               = 0f,
                                    Width           = 1f,
                                    ItemType        = (int)NoteType.BtLong,
                                    ClickSoundIndex = 0,
                                    Duration        = time - longBtStarts[trackIndex],
                                    LinkedNoteIndex = -1,
                                    TrackIndex      = trackIndex,
                                });
                                longBtStarts[trackIndex] = -1f;
                            }
                        }
                        // FX
                        for (int trackIndex = 0; trackIndex < 2; trackIndex++)
                        {
                            int  fx         = cache[1, trackIndex];
                            bool tryEndLong = fx != 2 || i == chartCaches.Count - 1;
                            if (fx == 1)
                            {
                                // FX Chip
                                sMap.Notes.Add(new Beatmap.Note()
                                {
                                    Time            = time,
                                    X               = 0.5f,
                                    Z               = 0f,
                                    Width           = 1f,
                                    ItemType        = (int)NoteType.FxChip,
                                    Speed           = 1f,
                                    ClickSoundIndex = 0,
                                    Duration        = 0,
                                    LinkedNoteIndex = -1,
                                    TrackIndex      = trackIndex,
                                });
                            }
                            if (fx == 2)
                            {
                                // Start FX Long
                                if (longFxStarts[trackIndex] < 0f)
                                {
                                    longFxStarts[trackIndex]  = time;
                                    longSfxIndexs[trackIndex] = (byte)ChartData.Fx_to_StagerFxType(cache[3, trackIndex]);
                                    longSfxParams[trackIndex] = ChartData.Param_to_StagerParam(
                                        cache[3, trackIndex], cache[4, trackIndex]
                                        );
                                }
                            }
                            // End Long
                            if (tryEndLong && longFxStarts[trackIndex] >= 0f)
                            {
                                sMap.Notes.Add(new Beatmap.Note()
                                {
                                    Time            = longFxStarts[trackIndex],
                                    X               = 0.5f,
                                    Z               = 0f,
                                    Width           = 1f,
                                    ItemType        = (int)NoteType.FxLong,
                                    ClickSoundIndex = 0,
                                    Speed           = 1f,
                                    Duration        = time - longFxStarts[trackIndex],
                                    LinkedNoteIndex = -1,
                                    TrackIndex      = trackIndex + 4,
                                    SoundFxIndex    = longSfxIndexs[trackIndex],
                                    SoundFxParamA   = longSfxParams[trackIndex],
                                });
                                longFxStarts[trackIndex] = -1f;
                            }
                        }
                        // LZ
                        for (int trackIndex = 0; trackIndex < 2; trackIndex++)
                        {
                            var lz = cache[2, trackIndex];
                            if (lz >= 0)
                            {
                                // New
                                int noteIndex = sMap.Notes.Count;
                                sMap.Notes.Add(new Beatmap.Note()
                                {
                                    Time            = time,
                                    X               = trackIndex == 0 ? cache.Lazer0_01 : cache.Lazer1_01,
                                    Z               = 0f,
                                    Width           = 0.2f,
                                    Speed           = 1f,
                                    ItemType        = (int)NoteType.LazerBlue + trackIndex,
                                    ClickSoundIndex = 0,
                                    Duration        = 0,
                                    LinkedNoteIndex = -1,
                                    TrackIndex      = 6,
                                });
                                if (prevLzIndex[trackIndex] >= 0)
                                {
                                    sMap.Notes[prevLzIndex[trackIndex]].LinkedNoteIndex = noteIndex;
                                }
                                prevLzIndex[trackIndex] = noteIndex;
                            }
                            if (lz == -1)
                            {
                                // End
                                prevLzIndex[trackIndex] = -1;
                            }
                        }
                    }
                    cacheTimeStart += cacheDuration;
                    chartCaches.Clear();
                    break;
                }
            }
            // Final
            return(sMap);
        }