public bool Add(GObject gObj, FObject fObj, bool isReplace = true) { if (gObj == null || fObj == null) { return(false); } if (_mapper.ContainsKey(gObj)) { if (isReplace) { _mapper.Remove(gObj); } else { return(false); } } gObj.onRemovedFromStage.Add(OnRemovedFromStage); _mapper.Add(gObj, fObj); return(true); }
public void HidePopup(FObject popup) { _root.HidePopup(popup.GetObject()); }
public void ShowPopup(FObject popup, FObject target, PopupDirection dir, bool closeUntilUpEvent) { _root.ShowPopup(popup.GetObject(), target.GetObject(), dir, closeUntilUpEvent); }
public void ShowPopup(FObject popup, FObject target, PopupDirection dir) { _root.ShowPopup(popup.GetObject(), target.GetObject(), dir); }
public void ShowPopup(FObject popup, FObject target) { _root.ShowPopup(popup.GetObject(), target.GetObject()); }
public void ShowPopup(FObject popup) { _root.ShowPopup(popup.GetObject()); }
public void SetHome(FObject obj) { _obj.SetHome(obj.GetObject()); }
// 如果要转换任意两个UI对象间的坐标,例如需要知道A里面的坐标(10,10)在B里面的位置,可以用: public Vector2 TransformPoint(Vector2 vector2, FObject comp) { return(_obj.TransformPoint(vector2, comp.GetObject())); }
public void AddRelation(FObject target, RelationType relationType) { _obj.AddRelation(target.GetObject(), relationType); }
// 关联 public void AddRelation(FObject target, RelationType relationType, bool usePercent) { _obj.AddRelation(target.GetObject(), relationType, usePercent); }
public void HidePopup(FObject obj) { Root.HidePopup(obj); }
public void ShowPopup(FObject obj) { Root.ShowPopup(obj); }