private GameObject GetMark(EMarkType type, long id) { GameObject item = null; var dict = _markPool[type]; return(dict.TryGetValue(id, out item) ? item : CreateMark(type, id)); }
public Cell(Cell src) { Value = src.Value; Round = src.Round; Type = src.Type; Array.Copy(src.possible, possible, possible.Length); }
protected Finding(Position position, uint value, uint round, EMarkType type) { Position = position; Value = value; Round = round; Type = type; }
private GameObject CreateMark(EMarkType type, long id) { var origTf = _origGoDict[type]; var dict = _markPool[type]; var newGo = UnityEngine.Object.Instantiate(origTf, _root, false); dict[id] = newGo; return(newGo); }
public void Clone(Cell src) { Value = src.Value; Round = src.Round; Type = src.Type; for (int i = 0; i < possible.Length; i++) { possible[i] = src.possible[i]; } }
public void Mark(uint value, uint round, EMarkType type) { Value = value; Round = round; Type = type; for (int v = 0; v < possible.Length; v++) { if (possible[v] == 0) { possible[v] = round; } } }
private void UpdatePos(EMarkType type, List <long> idList) { foreach (var id in idList) { var pos = adapter.GetTopPos(id); var go = GetMark(type, id); if (pos != null && UIUtils.InView(pos.Value)) { var pos2D = UIUtils.WorldPosToRect(pos.Value, CanvasRect); (go.transform as RectTransform).anchoredPosition = pos2D; UIUtils.SetActive(go, true); } else { UIUtils.SetActive(go, false); } } }
public void AddNote(EMarkType _mark) { if (RhythmPattern.Count > 0) { RhythmPattern[RhythmPattern.Count - 1].BeatBeforeNextNote = m_BeatCountBuffer + (m_IsHalfBeat ? 0.5f : 0f); if (RhythmPattern[RhythmPattern.Count - 1].BeatBeforeNextNote == 0) { RhythmPattern[RhythmPattern.Count - 1].BeatBeforeNextNote = 0.5f; } } m_BeatCountBuffer = 0; switch (_mark) { case EMarkType.Rythm1: RythmoPlay1(); break; case EMarkType.Rythm2: RythmoPlay2(); break; case EMarkType.Rythm3: RythmoPlay3(); break; case EMarkType.Back: UndoRhythmAndExit(); return; case EMarkType.Save: SaveRhythmAndExit(); return; default: break; } RhythmPattern.Add(new RhythmMark(_mark, 0)); m_CanBeat = true; }
private void UpdateVisible(EMarkType type, List <long> idList) { var origList = _idListCache[type]; if (origList.SetEquals(idList)) { return; } var newList = new HashSet <long>(idList); origList.ExceptWith(idList); _idListCache[type] = newList; foreach (var id in origList) { UIUtils.SetActive(GetMark(type, id), false); } //foreach (var id in newList) //{ // UIUtils.SetActive(GetMark(type, id), true); //} }
public FoundImpossibility(Position position, uint value, uint round, EMarkType type) : base(position, value, round, type) { }
public FoundValue(Position position, uint value, uint round, EMarkType type) : base(position, value, round, type) { }
public RhythmMark(EMarkType _noteIndex, float _beatElasped) { Note = _noteIndex; BeatBeforeNextNote = _beatElasped; }