Last active
April 22, 2016 07:08
-
-
Save tetya/cfc70fab73dbd082f56d5b4bf3f0821c to your computer and use it in GitHub Desktop.
抜粋
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
using System.Linq; | |
public class StudyManager : MonoBehaviour { | |
[SerializeField] QuestionDB qDB; | |
private int[] indexList = new int[10]; | |
// Use this for initialization | |
void Start () { | |
//指定のカテゴリIDのリストを抽出 | |
var cList = qDB.list.FindAll(qData => qData.categoryID == SQLMethods.CerrentID()); | |
//データベースの更新 | |
SQLMethods.InsertQDB(cList); | |
//datetime昇順で並べ替え | |
var newList = cList.OrderBy(p => p.datetime); | |
//idを配列に移す | |
int i = 0; | |
foreach(var n in newList){ | |
if(i < 10){ | |
indexList[i] = n.id; | |
}else{ | |
break; | |
} | |
i++; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment