private void InitialzeContent(Dictionary <long, DungeonInformation> inf, long objNo) { GameObject.Find("ActionText").GetComponent <Text>().text = CommonConst.Message.SelectDungeon; CharacterStatusPanel.SetActive(false); DungeonStatusPanel.SetActive(true); foreach (GameObject t in SelectedList.Values) { Destroy(t.gameObject); } SelectedList.Clear(); int index = 0; foreach (DungeonInformation d in inf.Values) { GameObject copy = GameObject.Instantiate(ScrollViewSelectedUnit, ScrollViewSelectedContents.transform); copy.SetActive(true); copy.transform.Find("OddImage").gameObject.SetActive(index % 2 == 0); index++; GameObject ray = copy.transform.Find("Text").gameObject; ray.GetComponent <Text>().text = d.Name; //イベントハンドラの設定 CommonFunction.AddListener(ray, EventTriggerType.PointerDown, e => OnClickSelectDungeon(e, d.DungeonObjNo)); SetItemUnSelectBack(copy); SelectedList.Add(d.DungeonObjNo, copy); } SetItemSelectBack(SelectedList[objNo]); SetDungeonDetail(objNo); SelectDungeon = objNo; }
private void SetDirectionAction(string target, KeyType[] names) { GameObject tar = ClickUI.transform.Find(target).gameObject; CommonFunction.AddListener(tar, EventTriggerType.PointerDown, e => OnPushChangeDirection(e, names)); CommonFunction.AddListener(tar, EventTriggerType.PointerUp, e => OnDirectionUp(e, names)); }
private void SetMoveAction(string target, KeyType[] names) { GameObject tar = ClickUI.transform.Find(target).gameObject; //CommonFunction.AddListener(tar, // EventTriggerType.UpdateSelected, e => OnSelectedMove(e, names)); CommonFunction.AddListener(tar, EventTriggerType.PointerDown, e => OnPushMove(e, names)); CommonFunction.AddListener(tar, EventTriggerType.PointerUp, e => OnMoveUp(e, names)); }
private void InitialzeContent()//List<TitleSelectAction> inf, int objNo) { CommonFunction.SetActive(SelectTargetPanel, true); foreach (GameObject t in SelectedList.Values) { Destroy(t.gameObject); } SelectedList.Clear(); int index = 0; GameObject copy = GameObject.Instantiate(ScrollViewSelectedUnit, ScrollViewSelectedContents.transform); copy.SetActive(true); copy.transform.Find("OddImage").gameObject.SetActive(index % 2 == 0); GameObject ray = copy.transform.Find("Text").gameObject; ray.GetComponent <Text>().text = CommonConst.Message.StartContinue; //イベントハンドラの設定 CommonFunction.AddListener(copy, EventTriggerType.PointerDown, e => OnClickSelectDungeon(e, (int)TitleSelectAction.Continue)); SelectedList.Add((int)TitleSelectAction.Continue, copy); index++; copy = GameObject.Instantiate(ScrollViewSelectedUnit, ScrollViewSelectedContents.transform); copy.SetActive(true); copy.transform.Find("OddImage").gameObject.SetActive(index % 2 == 0); ray = copy.transform.Find("Text").gameObject; ray.GetComponent <Text>().text = CommonConst.Message.StartFirst; //イベントハンドラの設定 CommonFunction.AddListener(copy, EventTriggerType.PointerDown, e => OnClickSelectDungeon(e, (int)TitleSelectAction.NewGame)); SelectedList.Add((int)TitleSelectAction.NewGame, copy); SetItemUnSelectBack(copy); Selected = (int)TitleSelectAction.Continue; SetItemSelectBack(SelectedList[Selected]); }