public void PlacementSucceeded() { mActivePlaceable.gameObject.SetActive(false); _menu.RefreshMenu(); mPlacedObjects++; if (mPlacedObjects >= _placeableObjects.Length) { _pnlGameOver.gameObject.SetActive(true); } mActivePlaceable = null; }
public void SetSelected(PlaceableObject obj) { for (int i = 0; i < _menuContentRoot.childCount; ++i) { PlaceableObject childObj = _menuContentRoot.GetChild(i).GetComponent <PlaceableObject>(); if (!childObj.gameObject.activeSelf) { continue; } if (childObj.pInfo.pName == obj.pInfo.pName) { childObj.SetHighlight(true); } else { childObj.SetHighlight(false); } } }
public void SetActivePlaceable(PlaceableObject obj) { mActivePlaceable = obj; _menu.SetSelected(obj); }