private void LoadElements() { this.backgroundImage = this.images.Pick(this.json.Background.Image.ImageIndex); this.clock = SeparatedClock.FromJson(this.json, this.images); this.date = FlexDate.FromJson(this.json, this.images); this.dow = Models.UIElements.DayOfWeek.FromJson(this.json, this.images); this.alarm = AlarmIcon.FromJson(this.json, this.images); this.locked = LockIcon.FromJson(this.json, this.images); this.noBluetooth = BluetoothDisconnectedIcon.FromJson(this.json, this.images); }
public void UnBindLockIcon(uint systemId, LockIcon icon) { if (mData.ContainsKey(systemId) == false) { mData.Add(systemId, new List <LockIcon>()); } List <LockIcon> lockList = mData[systemId]; if (lockList.Contains(icon)) { lockList.Remove(icon); } }
IEnumerator keyPicked() { KeyMod.SetActive(false); LockMod.SetActive(false); KeyIcon.SetActive(true); LockIcon.SetActive(true); ObjectText.SetActive(false); talkText.GetComponent <Text>().text = "A key and a lockpick !\n Now i can open that door"; yield return(new WaitForSeconds(5)); talkText.GetComponent <Text>().text = ""; ObjectText.transform.GetChild(0).GetComponent <Text>().text = "Open the house door with the key"; ObjectText.SetActive(true); }
public void FreshBySystemId(uint systemId) { if (mData.ContainsKey(systemId)) { List <LockIcon> lockList = mData[systemId]; for (int i = 0; i < lockList.Count; i++) { LockIcon lockIcon = lockList[i]; if (lockIcon != null) { FreshLockIcon(lockIcon); } } } }
public void FreshLockIcon(LockIcon lockIcon) { if (lockIcon == null) { return; } if (lockIcon.SystemId == 0) { return; } bool isOpenSystem = SysConfigManager.GetInstance().CheckSysHasOpened(lockIcon.SystemId); if (lockIcon.RealObj != null) { lockIcon.RealObj.gameObject.SetActive(isOpenSystem == false); } if (lockIcon.TargetImage != null) { if (lockIcon.Model == LockIcon.State.USE_COLOR) { if (isOpenSystem) { lockIcon.TargetImage.color = Color.white; } else { lockIcon.TargetImage.color = lockIcon.ExpectColor; } } else { GreyMaterialComponent greyComponent = lockIcon.GreyComponent as GreyMaterialComponent; if (greyComponent == null) { greyComponent = lockIcon.TargetImage.gameObject.AddComponent <GreyMaterialComponent>(); lockIcon.GreyComponent = greyComponent; } greyComponent.IsGrey = isOpenSystem == false; } } }