Example #1
0
        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);
        }
Example #2
0
File: FRoot.cs Project: cnscj/THSTG
 public void HidePopup(FObject popup)
 {
     _root.HidePopup(popup.GetObject());
 }
Example #3
0
File: FRoot.cs Project: cnscj/THSTG
 public void ShowPopup(FObject popup, FObject target, PopupDirection dir, bool closeUntilUpEvent)
 {
     _root.ShowPopup(popup.GetObject(), target.GetObject(), dir, closeUntilUpEvent);
 }
Example #4
0
File: FRoot.cs Project: cnscj/THSTG
 public void ShowPopup(FObject popup, FObject target, PopupDirection dir)
 {
     _root.ShowPopup(popup.GetObject(), target.GetObject(), dir);
 }
Example #5
0
File: FRoot.cs Project: cnscj/THSTG
 public void ShowPopup(FObject popup, FObject target)
 {
     _root.ShowPopup(popup.GetObject(), target.GetObject());
 }
Example #6
0
File: FRoot.cs Project: cnscj/THSTG
 public void ShowPopup(FObject popup)
 {
     _root.ShowPopup(popup.GetObject());
 }
Example #7
0
 public void SetHome(FObject obj)
 {
     _obj.SetHome(obj.GetObject());
 }
Example #8
0
 // 如果要转换任意两个UI对象间的坐标,例如需要知道A里面的坐标(10,10)在B里面的位置,可以用:
 public Vector2 TransformPoint(Vector2 vector2, FObject comp)
 {
     return(_obj.TransformPoint(vector2, comp.GetObject()));
 }
Example #9
0
 public void AddRelation(FObject target, RelationType relationType)
 {
     _obj.AddRelation(target.GetObject(), relationType);
 }
Example #10
0
 // 关联
 public void AddRelation(FObject target, RelationType relationType, bool usePercent)
 {
     _obj.AddRelation(target.GetObject(), relationType, usePercent);
 }
Example #11
0
 public void HidePopup(FObject obj)
 {
     Root.HidePopup(obj);
 }
Example #12
0
 public void ShowPopup(FObject obj)
 {
     Root.ShowPopup(obj);
 }