예제 #1
0
 // Places the Item on the input position
 public static void PlaceItem(BoardManager.Item itemToLocate, Vector2 position)
 {
     // Setting the position in a separate line is importatant in order to set it according to global coordinates.
     itemToLocate.gameItem.transform.position = position;
     itemToLocate.CityButton.transform.GetChild(0).gameObject.GetComponent <Text>().text = itemToLocate.CityNumber.ToString();
     itemToLocate.CityButton.onClick.AddListener(delegate { GameManager.gameManager.boardScript.ClickOnItem(itemToLocate); });
 }
예제 #2
0
 /// <summary>
 /// Places the Item on the input position
 /// </summary>
 public static void placeItem(BoardManager.Item ItemToLocate, Vector2 position)
 {
     //Setting the position in a separate line is importatant in order to set it according to global coordinates.
     ItemToLocate.gameItem.transform.position = position;
     ItemToLocate.CityButton.onClick.AddListener(delegate { GameManager.gameManager.boardScript.ClickOnItem(ItemToLocate); });
 }