Ejemplo n.º 1
0
        public void MinimapHUD_SetPlayerCoordinatesVector2()
        {
            Vector2 coords      = new Vector2(Random.Range(-150, 150), Random.Range(-150, 150));
            string  coordString = string.Format("{0},{1}", coords.x, coords.y);

            controller.UpdatePlayerPosition(coords);
            Assert.AreEqual(coordString, Reflection_GetField <TextMeshProUGUI>(this.controller.view, "playerPositionText").text);
        }
Ejemplo n.º 2
0
        public IEnumerator SetPlayerCoordinatesString()
        {
            Vector2 coords      = new Vector2(Random.Range(-150, 150), Random.Range(-150, 150));
            string  coordString = string.Format("{0},{1}", coords.x, coords.y);

            var controller = new MinimapHUDController();

            controller.UpdatePlayerPosition(coordString);

            yield return(null);

            Assert.AreEqual(coordString, navmapView.currentSceneCoordsText.text);
        }