Exemplo n.º 1
0
        public void SetMyPositionAndEnableToMapButtonIfHaveTarget(uint qrMyPositionId)
        {
            myPositionId = (int)qrMyPositionId;
            mainMenuGameObject.GetComponent <View_MainMenu>().MyPositionName.text =
                Service_NavigationPoint.GetNavigationPointNameById(myPositionId);

            mainMenuGameObject.GetComponent <View_MainMenu>().SetToMapButton(targetRoomId != -1);

            EnableMenu(MenuTypeEnum.MainMenu);
        }
Exemplo n.º 2
0
        private void OnEnable()
        {
            foreach (Transform child in blueprint.transform)
            {
                Destroy(child.gameObject);
            }
            mainMenuButton.transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = "Menü";

            mainMenuButton.onClick.AddListener(MainMenuButtonClicked);

            PutDots();
            PathFinder.SetMatrix(Service_NavigationPoint.GetAdjacencyMatrix());
            List <int> way = PathFinder.Dijkstra(controllerMenu.MyPositionId, controllerMenu.TargetRoomId);

            Coloring(way);
        }
Exemplo n.º 3
0
        private void PutDots()
        {
            Debug.Log("putDots");
            List <Vector3Int> coordsList = Service_NavigationPoint.GetCoordsList();

            instantiatedObjects = new List <InstantiatedObject>();
            foreach (var vector in coordsList)
            {
                instantiatedObjects.Add(
                    new InstantiatedObject(
                        Instantiate(
                            instantiatedPrefab,
                            new Vector3(vector.x / divider, vector.y / divider, 0 / divider),
                            transform.rotation,
                            blueprint.transform
                            ),
                        vector.z)
                    );
            }
        }
Exemplo n.º 4
0
 public bool CheckMyPlaceIdExist(uint placeId)
 {
     return(Service_NavigationPoint.ExistThisPlaceId(placeId));
 }
Exemplo n.º 5
0
 public bool CheckTargetNameExists(string targetName, out int result)
 {
     result = Service_NavigationPoint.ExistThisRoom(targetName);
     return(result != -1);
 }