Example #1
0
    public void FlagSet(NotesType type)
    {
        switch (type)
        {
        case NotesType.wideWave:
            wideFlag = true;
            break;

        case NotesType.verticalWaveRight:
            rightFlag = true;
            vertical.NoteGenerate(verticalNoteR, 1);
            break;

        case NotesType.verticalWaveLeft:
            leftFlag = true;
            vertical.NoteGenerate(verticalNoteL, 2);
            break;

        case NotesType.punch:
            punchFlag = true;
            break;

        case NotesType.laser:
            laserFlag = true;
            break;

        case NotesType.throwCube:
            throwFlag = true;
            int p = Random.Range(0, 2);
            throwCube.NoteGenerate(throwNote, p);
            break;
        }
    }
Example #2
0
    private void SelectedNotesInfoSection()
    {
        GUILayout.BeginHorizontal();

        for (int i = 0; i < Enum.GetValues(typeof(NotesType)).Length; i++)
        {
            NotesType __type = ((NotesType)Enum.GetValues(typeof(NotesType)).GetValue(i));

            if (__type == _noteSelectedType)
            {
                GUI.color = Color.cyan;
            }
            else
            {
                GUI.color = Color.white;
            }

            if (GUILayout.Button(__type.ToString(), EditorStyles.miniButton, GUILayout.MaxWidth(100)))
            {
                _noteSelectedType = __type;
            }
        }
        GUI.color = Color.white;
        GUILayout.EndHorizontal();
        EditorGUILayout.Space();
    }
 protected new void Awake()
 {
     base.Awake();
     Type           = NotesType.Normal;
     notesTrans     = gameObject.transform;
     spriteRenderer = GetComponent <SpriteRenderer>();
 }
Example #4
0
        internal GhNotesItem(string name, NotesType type, NotesDifficulty difficulty, string songName)
        {
            this.Name = name;
            this.Type = type;
            this.Difficulty = difficulty;
            this.IsMapped = false;
            this.MappedFile = null;
            this.MappedFileItem = null;

            switch (type)
            {
                case NotesType.Guitar:
                    this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_{1}", songName, difficulty.ToString()));
                    this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_{1}_Star", songName, difficulty.ToString()));
                    this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_{1}_StarBattleMode", songName, difficulty.ToString()));
                    break;
                case NotesType.Rhythm:
                    this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_Rhythm_{1}", songName, difficulty.ToString()));
                    this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_Rhythm_{1}_Star", songName, difficulty.ToString()));
                    this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_Rhythm_{1}_StarBattleMode", songName, difficulty.ToString()));
                    break;
                case NotesType.GuitarCoop:
                    this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_GuitarCoop_{1}", songName, difficulty.ToString()));
                    this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_GuitarCoop_{1}_Star", songName, difficulty.ToString()));
                    this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_GuitarCoop_{1}_StarBattleMode", songName, difficulty.ToString()));
                    break;
                case NotesType.RhythmCoop:
                    this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_RhythmCoop_{1}", songName, difficulty.ToString()));
                    this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_RhythmCoop_{1}_Star", songName, difficulty.ToString()));
                    this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_RhythmCoop_{1}_StarBattleMode", songName, difficulty.ToString()));
                    break;
            }
        }
Example #5
0
    public MusicNote ToType(NotesType Type)
    {
        var typenote = (MusicNote)MemberwiseClone();

        typenote.NoteType = Type;
        return(typenote);
    }
Example #6
0
 public NotesData(float time, int channelId, NotesType type, NotesPosition goal, NotesPosition start)
 {
     Time      = time;
     ChannelId = channelId;
     Type      = type;
     Goal      = goal;
     Start     = start;
 }
Example #7
0
 public D_Notes()
 {
     notesId = refid = userId = 0;
     notesType = NotesType.N_A;
     notes = "";
     status = false;
     notesDate = new DateTime(1900, 1, 1);
 }
Example #8
0
 // Setup
 public void Setup(float time, int column, int fraction, NotesType type)
 {
     // Init variables
     this.time = time;
     this.column = column;
     this.fraction = fraction;
     this.type = type;
     this.state = NotesState.DISABLE;
 }
Example #9
0
 // Setup
 public void Setup(float time, int column, int fraction, NotesType type)
 {
     // Init variables
     this.time     = time;
     this.column   = column;
     this.fraction = fraction;
     this.type     = type;
     this.state    = NotesState.DISABLE;
 }
Example #10
0
    /// <summary>
    /// ノーツのゲームオブジェクトを生成する
    /// </summary>
    /// <param name="type"></param>
    /// <param name="lane"></param>
    /// <param name="laneObjs"></param>
    /// <returns></returns>
    protected GameObject GenerateNote(NotesType type, int lane, GameObject[] laneObjs)
    {
        GameObject notes = null;

        const int blueNotes = 0;
        const int redNotes  = 1;
        const int grayNotes = 2;

        switch (type)
        {
        case NotesType.Normal:

            if (lane == Constant.redLane)
            {
                notes = noteObjData.normalNoteObj[redNotes];
            }
            else if (lane == Constant.leftGrayLane || lane == Constant.rightGrayLane)
            {
                notes = noteObjData.normalNoteObj[grayNotes];
            }
            else
            {
                notes = noteObjData.normalNoteObj[blueNotes];
            }

            break;

        case NotesType.Hold:

            if (lane == Constant.redLane)
            {
                notes = noteObjData.holdNoteObj[redNotes];
            }
            else if (lane == Constant.leftGrayLane || lane == Constant.rightGrayLane)
            {
                notes = noteObjData.holdNoteObj[grayNotes];
            }
            else
            {
                notes = noteObjData.holdNoteObj[blueNotes];
            }

            break;

        case NotesType.Barrage:

            notes = noteObjData.barrageObj;
            break;
        }

        GameObject generateObj = Instantiate(notes, laneObjs[lane - 1].transform, false);

        return(generateObj);
    }
    /// <summary>
    /// ノーツの判定処理
    /// </summary>
    /// <param name="currentFlame"></param>
    /// <param name="judgeLane"></param>
    /// <param name="judgeData"></param>
    public JudgeType Judge(ref NotesType type, int currentFlame, int judgeLane, int deltaFlame, JudgeData judgeData)
    {
        JudgeType judgeResult = JudgeType.None;

        if (nextNotes[judgeLane] == null)
        {
            if (ButtonDownInput(judgeLane))
            {
                SetLaneBeamColor(judgeLane, beamColor.noneColor);
            }
            return(judgeResult);
        }

        int differenceFlame    = nextNotes[judgeLane].TimingFlame - currentFlame;
        int endDifferenceFlame = 0;

        type = nextNotes[judgeLane].Type;

        switch (type)
        {
        case NotesType.Normal:

            judgeResult = NormalNoteJudge(differenceFlame, judgeLane, judgeData);
            break;

        case NotesType.Hold:

            HoldNotes holdNotes = (HoldNotes)nextNotes[judgeLane];
            endDifferenceFlame = holdNotes.EndTimingFlame - currentFlame;
            judgeResult        = HoldNoteJudge(differenceFlame, endDifferenceFlame, judgeLane, deltaFlame, judgeData);
            break;

        case NotesType.Barrage:

            BarrageNotes barrageNotes = (BarrageNotes)nextNotes[judgeLane];
            endDifferenceFlame = barrageNotes.EndTimingFlame - currentFlame;
            judgeResult        = BarrageNoteJudge(differenceFlame, endDifferenceFlame, judgeLane, judgeData);
            break;
        }

        return(judgeResult);
    }
    private void PlayTapSE(NotesType type, int lane, bool isShiny = false)
    {
        if (!isPlayTapSe)
        {
            return;
        }

        if (isShiny)
        {
            //Find.GetAudioManager().PlaySE("Accent_1");
            CriAudioManager.Instance.PlaySE("Accent_1");
        }

        if (type == NotesType.Barrage)
        {
            if (lane == -1)
            {
                Find.GetAudioManager().PlayOneShotSE("Impact_1");
                //CriAudioManager.Instance.PlaySE("Impact_1");
            }
            else
            {
                Find.GetAudioManager().PlayOneShotSE("Tap_4");
                //CriAudioManager.Instance.PlaySE("Tap_3");
            }
        }
        else
        {
            if (lane == 5 || lane == 6)
            {
                // Find.GetAudioManager().PlayOneShotSE("Tap_3");
                CriAudioManager.Instance.PlaySE("Tap_3");
            }
            else
            {
                // Find.GetAudioManager().PlayOneShotSE("Tap_5");
                CriAudioManager.Instance.PlaySE("Tap_5");
            }
        }
    }
Example #13
0
    public void NoteSet(NotesType type, string[] posBool)
    {
        switch (type)
        {
        case NotesType.wideWave:
            wideFlag = true;
            for (int i = 2; i < 8; i++)
            {
                if (posBool[i] == TRUE)
                {
                    wide.NoteGenerate(wideNote, notePos[i - 2]);
                    //Debug.Log(posBool[i]);
                }
            }
            break;

        case NotesType.verticalWaveRight:
            rightFlag = true;
            //Debug.Log(posBool[3]);
            //vertical.NoteGenerate(verticalNoteR, 1);
            for (int i = 2; i < 8; i++)
            {
                if (posBool[i] == TRUE)
                {
                    vertical.NoteGenerate(verticalNoteR, notePos[i - 2]);
                    //Debug.Log(posBool[i]);
                }
            }
            break;

        case NotesType.verticalWaveLeft:
            leftFlag = true;
            //vertical.NoteGenerate(verticalNoteL, 2);
            break;

        case NotesType.punch:
            punchFlag = true;
            break;

        case NotesType.laser:
            laserFlag = true;
            break;

        case NotesType.throwCube:
            throwFlag = true;
            //int p = Random.Range(0, 2);
            bool R = false;
            bool L = false;
            for (int i = 2; i < 8; i++)
            {
                if (posBool[i] == TRUE)
                {
                    if (i - 2 <= 2)
                    {
                        R = true;
                    }
                    if (i - 2 >= 3)
                    {
                        L = true;
                    }
                    //Debug.Log(posBool[i]);
                }
            }
            if (R == true)
            {
                throwCube.NoteGenerate(throwNote, new Vector3(0, 0, 0));
            }
            if (L == true)
            {
                throwCube.NoteGenerate(throwNote, new Vector3(1, 0, 0));
            }
            break;
        }
    }
Example #14
0
 public void setType(NotesType type)
 {
     this.type = type;
 }
Example #15
0
        string INotesParser.MatchType(NotesType type, NotesDifficulty difficulty)
        {
            string val = string.Empty;
            string diff = string.Empty;
            string t = string.Empty;

            switch (difficulty)
            {
                case NotesDifficulty.Easy:
                    diff = "Easy";
                    break;
                case NotesDifficulty.Medium:
                    diff = "Medium";
                    break;
                case NotesDifficulty.Hard:
                    diff = "Hard";
                    break;
                case NotesDifficulty.Expert:
                    diff = "Expert";
                    break;
            }

            if (diff.Length != 0)
            {
                switch (type)
                {
                    case NotesType.Guitar:
                        t = "Single";
                        break;
                    case NotesType.Rhythm:
                        t = "DoubleBass";
                        break;
                    case NotesType.GuitarCoop:
                        t = "CoopLead";
                        break;
                    case NotesType.RhythmCoop:
                        t = "CoopBass";
                        break;
                }

                t = string.Concat(diff, t);
                if (_headerNames.ContainsKey(t))
                    val = t;

            }

            return val;
        }
    public void UpdateManage(ref UIDataStruct uiData, RuleStruct gaugeRule, GameObject[] laneObjs, JudgeData timingRange, bool isStarted)
    {
        int currentFlame = timeCountroller.PlayFlame;
        int deltaFlame   = timeCountroller.DeltaFlame;

        for (int i = 0; i < laneObjs.Length; i++)
        {
            NotesType type        = NotesType.Normal;
            JudgeType judgeResult = JudgeType.None;

            if (isStarted)
            {
                type        = NotesType.Normal;
                judgeResult = Judge(
                    type: ref type,
                    currentFlame: currentFlame,
                    judgeLane: i,
                    deltaFlame: deltaFlame,
                    judgeData: timingRange
                    );

                uiData.barrageCount = targetBarrageCount;
            }

            LaneBeamManage(i);

            if (judgeResult == JudgeType.None)
            {
                continue;
            }

            uiData.judgeCount[(int)judgeResult]++;
            uiData.scoreCount += timingRange.judges[(int)judgeResult].scoreCount;

            float typeRate = 1.0f;
            if (type == NotesType.Hold)
            {
                typeRate = gaugeRule.holdParRate;
            }

            if (judgeResult == JudgeType.Miss)
            {
                float missPenalty = gaugeRule.missPenalty;

                if (gaugeRule.dyingRate >= uiData.gaugePer)
                {
                    missPenalty /= 2;
                }

                uiData.conboCount = 0;
                uiData.gaugePer   = Mathf.Clamp01(uiData.gaugePer - missPenalty * typeRate / 100);
            }
            else
            {
                float addPer = gaugeRule.gaugeCount[(int)judgeResult] / (float)uiData.totalGaugeCount * gaugeRule.parRate * typeRate;
                uiData.gaugePer = Mathf.Clamp01(uiData.gaugePer + addPer);

                uiData.conboCount++;
                judgeLineAnim.SetTrigger("Shiny");

                if (uiData.maxConbo < uiData.conboCount)
                {
                    uiData.maxConbo = uiData.conboCount;
                }
            }
        }

        judgeLineMaterial.SetFloat("_Shiny", judgeLineShiny);
    }
Example #17
0
        public GhNotesItem SourceGenerationItem(NotesType type)
        {
            GhNotesItem source = null;
            source = findMappedGhItemType(type);
            if (source == null && type != NotesType.Guitar)
                source = findMappedGhItemType(NotesType.Guitar); //if not found then resort to guitar

            if (source == null)
                source = findMappedGhItemType(NotesType.Rhythm);

            if (source == null)
                source = findMappedGhItemType(NotesType.GuitarCoop);

            if (source == null)
                source = findMappedGhItemType(NotesType.RhythmCoop);

            return source;
        }
Example #18
0
        public GhNotesItem SourceGenerationItem(NotesType type, NotesDifficulty difficulty)
        {
            foreach (GhNotesItem ghi in _ghItems)
            {
                if (type == ghi.Type && difficulty == ghi.Difficulty)
                    return ghi;
            }
            if (type != NotesType.Guitar)
                return SourceGenerationItem(NotesType.Guitar, difficulty);

            return null;
        }
Example #19
0
 private bool findMatch(NotesFile nf, GhNotesItem ghi, NotesType type, NotesDifficulty difficulty)
 {
     string match;
     if (nf.Parser != null)
     {
         match = nf.Parser.MatchType(type, difficulty);
         if (match.Length != 0)
         {
             int j = 0;
             foreach (NotesFileItem nfi in nf.Items)
             {
                 if (!ghi.IsMapped && nfi.SourceName == match && nfi.Notes.Length > 1 * 3)
                 {
                     this.MapToGhItem(nf, nfi.UniqueId, ghi, false);
                     return true;
                 }
                 j++;
             }
         }
     }
     return false;
 }
Example #20
0
 private GhNotesItem findMappedGhItemType(NotesType type)
 {
     GhNotesItem item = null;
     foreach (GhNotesItem ghi in _ghItems)
     {
         if (type == ghi.Type && ghi.IsMapped && !ghi.MappedFileItem.HasGeneratedNotes && (item == null || item != null && (int)(item.Difficulty) < (int)(ghi.Difficulty)))
             item = ghi;
     }
     return item;
 }