public override void SetValue(params object[] vs) { var value = vs[0] as string; for (var i = 0; i < list.Count; i++) { var free = list[i]; free.SetValue(0, ""); } if (string.IsNullOrEmpty(value) || value == "null") { return; } var ss = value.Split("_"); var sp = (SimpleProto)vs[1]; for (var i = 0; i < Math.Min(ss.Length, _row); i++) { var index = Convert.ToInt32(ss[i]); var subSp = sp.Ps[index]; SimpleFreeUI.SetValue(Key, subSp, llist[i]); } foreach (Transform tr in sprite.GetComponentsInChildren <Transform>(true)) { tr.gameObject.SetActive(true); } }
public void RemoveUi(SimpleFreeUI ui) { if (ui != null) { _uis.Remove(ui.Key); } }
public SimpleFreeUI GetUi(string key) { SimpleFreeUI ret = null; _uis.TryGetValue(key, out ret); return(ret); }
public void AddUi(SimpleFreeUI ui) { SimpleFreeUI old; _uis.TryGetValue(ui.Key, out old); if (old != null) { old.Visible = false; } _uis.Add(ui.Key, ui); }
public void Show(SimpleFreeUI sprite, int currentTime, int totalTime) { if (currentTime < totalTime || totalTime == 0) { sprite.Visible = true; for (var index = 0; index < _changes.Count; index++) { var uc = _changes[index]; uc.SetValue(currentTime, totalTime, sprite); } } else { sprite.Visible = false; sprite.X = sprite.OrignalX; sprite.Y = sprite.OrignalY; sprite.Width = sprite.OrignalWidth; sprite.Height = sprite.OrignalHeight; sprite.ScaleX = 1; sprite.ScaleY = 1; sprite.Alpha = 1; } }