Пример #1
0
        public void SelectAutoTile(AutoTile tile)
        {
            if (selected2.activeInHierarchy)
            {
                selected.SetActive(true);
                tile.attach(selected);
                this.selectedTile = tile;
                //유닛 설치에 관한 다이얼로그 표시
                //TODO : 다이얼로그 만들고 이 클래스에 인터페이스를 추가하는식으로 이어줘야 한다
                OKCancelDialog dialog = okCancelDialog.GetComponent <OKCancelDialog>();

                dialog.SetDialogListener(this);
                okCancelDialog.SetActive(true);
                dialog.SetText("이 곳에 해당 유닛을 위치시키겠습니까?");
            }
        }
Пример #2
0
        public void attach()
        {
            string     name       = "autotile(" + this.x + "," + this.y + ")";
            Transform  tfAutoTile = this.autoMapper.transform.Find(name);
            GameObject goAutoTile = tfAutoTile.gameObject;

            if (goAutoTile == null)
            {
                throw new CannotFindComponentException(name + "을 찾지못함");
            }
            AutoTile tile = goAutoTile.GetComponent <AutoTile>();

            if (tile == null)
            {
                throw new CannotFindComponentException(name + " AutoTile 을 찾지못함");
            }
            tile.attach(this.gameObject);
        }