public PatternFrameInfo AddFrame(int dataIndex, int frameIndex) { if (!ExistsCheck(dataIndex)) { PopupWindow.instance.Active("Pattern does not Exists", Color.white); return(null); } PatternFrameInfo info = new PatternFrameInfo(frameIndex); data[dataIndex].frames.Add(info); FrameSort(dataIndex); return(info); }
public void AddPatternPreset(int dataIndex, int frameIndex, PatternFrameInfo.Preset preset) { if (!ExistsCheck(dataIndex)) { PopupWindow.instance.Active("Pattern does not Exists", Color.white); return; } PatternFrameInfo info = FindFrame(dataIndex, frameIndex); if (info == null) { info = AddFrame(dataIndex, frameIndex); info.presets.Add(preset); } else { info.presets.Add(preset); } }