Buildings added, Info and Upgrade Menus Display data, Scriptable Object improved
This commit is contained in:
@@ -10,7 +10,6 @@ public class WorldItemSelector : MonoBehaviour
|
||||
public float moveThreshold = 1;
|
||||
public LayerMask layerMask;
|
||||
|
||||
public Transform selectedItemUI;
|
||||
public void SelectScreenPoint(Vector2 screenPoint){
|
||||
Ray ray = Camera.main.ScreenPointToRay(screenPoint);
|
||||
RaycastHit hit = new RaycastHit();
|
||||
@@ -24,30 +23,12 @@ public class WorldItemSelector : MonoBehaviour
|
||||
Debug.Log("No target here, Unselecting");
|
||||
Selector.selectBuilding(null);
|
||||
}
|
||||
RefreshUI();
|
||||
}else{
|
||||
Selector.selectBuilding(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void RefreshUI(){
|
||||
selectedItemUI.gameObject.SetActive(Selector.selectedBuilding !=null);
|
||||
if(Selector.selectedBuilding!=null){
|
||||
selectedItemUI.GetChild(0).GetComponent<Text>().text = Selector.selectedBuilding.buildingData.buildingName;
|
||||
}
|
||||
|
||||
// switch (Selector.selectedBuilding.buildingData.buildingName)
|
||||
// {
|
||||
// case "Research Facility":
|
||||
// Debug.Log("research facility menu");
|
||||
// break;
|
||||
|
||||
// case "Green House":
|
||||
// Debug.Log("green house menu");
|
||||
// break;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Vector2 startedPos= Vector2.zero;
|
||||
public void OnPointerDown(BaseEventData e){
|
||||
|
||||
Reference in New Issue
Block a user