void Start() { nav = GameObject.Find("CanvasNav").gameObject; nav.SetActive(false); //setSampleData(); taskList = new List <Manager.Task>(); taskList = Manager.Instance.GetTaskListForType(1); for (int i = 0; i < taskList.Count; i++) { GameObject obj = Instantiate(taskPrefab); obj.transform.parent = content.transform; obj.transform.localScale = obj.transform.lossyScale; //原寸に QuestTaskButton qtb = obj.GetComponent <QuestTaskButton>(); qtb.SetTask(taskList[i]); obj.transform.Find("Text").GetComponent <Text>().text = taskList[i].Name; } gameData = Manager.Instance.GetGameDataAll(); myHP.fillAmount = gameData.MyHP; Debug.Log("HP:" + gameData.MyHP); enemyHP.fillAmount = gameData.EnemyHP; }
public void Start() { Manager.Task myTask1 = new Manager.Task(); Manager.GameData data = new Manager.GameData(); data = Manager.Instance.GetGameDataAll(); text.text = "" + data.Coin; }
void Start() { //このスクリプト内で新規に作るタスクの宣言 Manager.Task myTask1 = new Manager.Task(); int type = 1; //quest string name = "課題"; string description = "教科書10ページ"; int difficully = 1; int maxContinuation = 5; DateTime deadLine = new DateTime(2000, 8, 1); Manager.Instance.SetTask(type, name, description, difficully, deadLine, maxContinuation); //登録 type = 1; //quest name = "掃除"; description = "自分の部屋"; difficully = 1; maxContinuation = 6; deadLine = new DateTime(2000, 8, 2); Manager.Instance.SetTask(type, name, description, difficully, deadLine, maxContinuation); //登録 //取得 List <Manager.Task> list = new List <Manager.Task>(); list = Manager.Instance.GetTaskAll(); for (int i = 0; i < list.Count; i++) { Debug.Log("タスク[" + i + "] 名前:" + list[i].Name + ", 説明:" + list[i].Description + ", GUID" + list[i].GUID); } Manager.GameData gameData = Manager.Instance.GetGameDataAll(); for (int i = 0; i < gameData.isWeaponGetting.Count; i++) { Debug.Log(gameData.isWeaponGetting[i]); } Manager.Instance.SetIsWeponListByIndex(1, true); }
private void Start() { Manager.Task myTask1 = new Manager.Task(); data = Manager.Instance.GetGameDataAll(); HP.fillAmount = data.MyHP; }