Skip to content

Instantly share code, notes, and snippets.

@tetya
Last active April 22, 2016 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tetya/cfc70fab73dbd082f56d5b4bf3f0821c to your computer and use it in GitHub Desktop.
Save tetya/cfc70fab73dbd082f56d5b4bf3f0821c to your computer and use it in GitHub Desktop.
抜粋
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