public override void SetMinMaxValue(float _min, float _max) { base.SetMinMaxValue(_min, _max); if (clipAmountUI) { clipAmountUI.SetMinMaxValue(_min, _max); } }
protected virtual void SyncItemUI() { if (!Data.syncValuesToUI) { return; } if (Data.layoutMaster) { UIEngineValueEntity itemUI = null; if (Data.itemSyncType == LayoutSync.UISyncType.SpawnedUI) { itemUI = ui; } else if (Data.itemSyncType == LayoutSync.UISyncType.EntityRootOwnerUI) { var root = transform.root.GetComponentInChildren <EngineEntity>(); itemUI = root.UI; } if (itemUI) { ammoClipAmountChangedUI = itemUI.GetEngineValueUI(Data.layoutMaster, Data.ammoClipAmountSync.syncSelection.indexValue); clipAmountChanged += ammoClipAmountChangedUI.SetCurValue; OnClipAmountChanged(); ammoClipIndexChangedUI = itemUI.GetEngineValueUI(Data.layoutMaster, Data.ammoIndSync.syncSelection.indexValue); clipIndexChanged += ammoClipIndexChangedUI.SetCurValue; OnClipIndexChanged(); ammoReloadUI = itemUI.GetEngineValueUI(Data.layoutMaster, Data.reloadSync.syncSelection.indexValue); reloadingTime += ammoReloadUI.SetCurValue; ammoReloadUI.SetMinMaxValue(0, Data.reloadTime); OnReloading(); } } }