void SetLocked(ActionButton actionBtn, CActionItem actionItem) { CObject_Item item = actionItem.GetImpl() as CObject_Item; if (item.isLocked) { actionBtn.Disable(); } else { actionBtn.Enable(); } }
void Awake() { if (buttonA == null) { GameObject buttonObj = GameObject.Find(Constants.BUTTON_A_TAG); buttonA = buttonObj.GetComponent <ActionButton>(); buttonA.Disable(); } if (player == null) { player = GameObject.Find(Constants.PLAYER_TAG).GetComponent <Player>(); } call = delegate { Interact(player); }; }
public void UpdateBaseLayer(string selection, string source) { if (source.Equals(StylePopupContent.CartoVectorSource)) { // Nutiteq styles are bundled with the SDK, we can initialize them via constuctor if (selection.Equals(StylePopupContent.Voyager)) { CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleVoyager); } else if (selection.Equals(StylePopupContent.Positron)) { CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStylePositron); } else { CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleDarkmatter); } } else if (source.Equals(StylePopupContent.CartoRasterSource)) { if (selection.Equals(StylePopupContent.HereSatelliteDaySource)) { CurrentLayer = new CartoOnlineRasterTileLayer("here.satellite.day@2x"); } else if (selection.Equals(StylePopupContent.HereNormalDaySource)) { CurrentLayer = new CartoOnlineRasterTileLayer("here.normal.day@2x"); } } if (source.Equals(StylePopupContent.CartoRasterSource)) { LanguageButton.Disable(); } else { LanguageButton.Enable(); } MapView.Layers.Clear(); MapView.Layers.Add(CurrentLayer); InitializeVectorTileListener(); }