• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# FairyGUI.GObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FairyGUI.GObject的典型用法代码示例。如果您正苦于以下问题:C# GObject类的具体用法?C# GObject怎么用?C# GObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GObject类属于FairyGUI命名空间,在下文中一共展示了GObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GearBase

 public GearBase(GObject owner)
 {
     _owner = owner;
     pageSet = new PageOptionSet();
     easeType = Ease.OutQuad;
     tweenTime = 0.3f;
 }
开发者ID:hxyxj,项目名称:FairyGUI-unity,代码行数:7,代码来源:GearBase.cs


示例2: GearBase

 public GearBase(GObject owner)
 {
     _owner = owner;
     easeType = Ease.OutQuad;
     tweenTime = 0.3f;
     delay = 0;
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:7,代码来源:GearBase.cs


示例3: ReturnObject

 public void ReturnObject(GObject obj)
 {
     string url = obj.resourceURL;
     Queue<GObject> arr;
     if (_pool.TryGetValue(url, out arr))
         arr.Enqueue(obj);
 }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:7,代码来源:GObjectPool.cs


示例4: AddBeforeMe

        public void AddBeforeMe(GObject target)
        {
            if (parent == null)
                throw new Exception("parent not set");

            int index = parent.GetChildIndex(this);
            parent.AddChildAt(target, index);
        }
开发者ID:hxyxj,项目名称:FairyGUI-unity,代码行数:8,代码来源:GGraph.cs


示例5: PinchGesture

        public PinchGesture(GObject host)
        {
            _host = host;
            Enable(true);

            _touches = new int[2];

            onBegin = new EventListener(this, "onPinchBegin");
            onEnd = new EventListener(this, "onPinchEnd");
            onAction = new EventListener(this, "onPinchAction");
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:11,代码来源:PinchGesture.cs


示例6: LongPressGesture

        public LongPressGesture(GObject host)
        {
            _host = host;
            trigger = TRIGGER;
            interval = INTERVAL;
            Enable(true);

            onBegin = new EventListener(this, "onLongPressBegin");
            onEnd = new EventListener(this, "onLongPressEnd");
            onAction = new EventListener(this, "onLongPressAction");
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:11,代码来源:LongPressGesture.cs


示例7: SwipeGesture

        public SwipeGesture(GObject host)
        {
            _host = host;
            actionDistance = ACTION_DISTANCE;
            snapping = true;
            Enable(true);

            onBegin = new EventListener(this, "onSwipeBegin");
            onEnd = new EventListener(this, "onSwipeEnd");
            onMove = new EventListener(this, "onSwipeMove");
            onAction = new EventListener(this, "onnSwipeAction");
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:12,代码来源:SwipeGesture.cs


示例8: RotationGesture

        public RotationGesture(GObject host)
        {
            _host = host;
            Enable(true);

            _touches = new int[2];
            snapping = true;

            onBegin = new EventListener(this, "onRotationBegin");
            onEnd = new EventListener(this, "onRotationEnd");
            onAction = new EventListener(this, "onRotationAction");
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:12,代码来源:RotationGesture.cs


示例9: Add

 public void Add(GObject target, RelationType relationType, bool usePercent)
 {
     foreach (RelationItem item in _items)
     {
         if (item.target == target)
         {
             item.Add(relationType, usePercent);
             return;
         }
     }
     RelationItem newItem = new RelationItem(_owner);
     newItem.target = target;
     newItem.Add(relationType, usePercent);
     _items.Add(newItem);
 }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:15,代码来源:Relations.cs


示例10: Add

 /// <summary>
 /// 
 /// </summary>
 /// <param name="target"></param>
 /// <param name="relationType"></param>
 /// <param name="usePercent"></param>
 public void Add(GObject target, RelationType relationType, bool usePercent)
 {
     int cnt = _items.Count;
     for (int i = 0; i < cnt; i++)
     {
         RelationItem item = _items[i];
         if (item.target == target)
         {
             item.Add(relationType, usePercent);
             return;
         }
     }
     RelationItem newItem = new RelationItem(_owner);
     newItem.target = target;
     newItem.Add(relationType, usePercent);
     _items.Add(newItem);
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:23,代码来源:Relations.cs


示例11: ReplaceMe

        public void ReplaceMe(GObject target)
        {
            if (parent == null)
                throw new Exception("parent not set");

            target.name = this.name;
            target.alpha = this.alpha;
            target.rotation = this.rotation;
            target.visible = this.visible;
            target.touchable = this.touchable;
            target.grayed = this.grayed;
            target.SetXY(this.x, this.y);
            target.SetSize(this.width, this.height);

            int index = parent.GetChildIndex(this);
            parent.AddChildAt(target, index);
            target.relations.CopyFrom(this.relations);

            parent.RemoveChild(this, true);
        }
开发者ID:hxyxj,项目名称:FairyGUI-unity,代码行数:20,代码来源:GGraph.cs


示例12: TogglePopup

 /// <summary>
 /// 
 /// </summary>
 /// <param name="popup"></param>
 /// <param name="target"></param>
 public void TogglePopup(GObject popup, GObject target)
 {
     TogglePopup(popup, target, null);
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:9,代码来源:GRoot.cs


示例13: ShowTooltipsWin

        /// <summary>
        /// 
        /// </summary>
        /// <param name="tooltipWin"></param>
        public void ShowTooltipsWin(GObject tooltipWin)
        {
            HideTooltips();

            _tooltipWin = tooltipWin;
            Timers.inst.Add(0.1f, 1, __showTooltipsWin);
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:11,代码来源:GRoot.cs


示例14: ShowPopup

        /// <summary>
        /// Show a popup object along with the specific target object.
        /// 显示一个popup。将popup显示在指定对象的上边或者下边。
        /// popup的特点是点击popup对象外的区域,popup对象将自动消失。
        /// </summary>
        /// <param name="popup"></param>
        /// <param name="target"></param>
        /// <param name="downward">True to display downwards, false to display upwards, null to display automatically.</param>
        public void ShowPopup(GObject popup, GObject target, object downward)
        {
            if (_popupStack.Count > 0)
            {
                int k = _popupStack.IndexOf(popup);
                if (k != -1)
                {
                    for (int i = _popupStack.Count - 1; i >= k; i--)
                    {
                        int last = _popupStack.Count - 1;
                        ClosePopup(_popupStack[last]);
                        _popupStack.RemoveAt(last);
                    }
                }
            }
            _popupStack.Add(popup);

            AddChild(popup);
            AdjustModalLayer();

            if ((popup is Window) && target == null && downward == null)
                return;

            Vector2 pos = GetPoupPosition(popup, target, downward);
            popup.xy = pos;
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:34,代码来源:GRoot.cs


示例15: ScrollToView

 public void ScrollToView(GObject obj)
 {
     ScrollToView(obj, false);
 }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:4,代码来源:ScrollPane.cs


示例16: GearDisplay

 public GearDisplay(GObject owner)
     : base(owner)
 {
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:4,代码来源:GearDisplay.cs


示例17: GearXY

 public GearXY(GObject owner)
     : base(owner)
 {
 }
开发者ID:aideas,项目名称:F-N-GUI,代码行数:4,代码来源:GearXY.cs


示例18: ClosePopup

 void ClosePopup(GObject target)
 {
     if (target.parent != null)
     {
         if (target is Window)
             ((Window)target).Hide();
         else
             RemoveChild(target);
     }
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:10,代码来源:GRoot.cs


示例19: HidePopup

 /// <summary>
 /// Close a popup.
 /// </summary>
 /// <param name="popup"></param>
 public void HidePopup(GObject popup)
 {
     if (popup != null)
     {
         int k = _popupStack.IndexOf(popup);
         if (k != -1)
         {
             for (int i = _popupStack.Count - 1; i >= k; i--)
             {
                 int last = _popupStack.Count - 1;
                 ClosePopup(_popupStack[last]);
                 _popupStack.RemoveAt(last);
             }
         }
     }
     else
     {
         foreach (GObject obj in _popupStack)
             ClosePopup(obj);
         _popupStack.Clear();
     }
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:26,代码来源:GRoot.cs


示例20: IsChildInView

        public bool IsChildInView(GObject obj)
        {
            if (_vScroll)
            {
                float top = _yPerc * (_contentHeight - _maskHeight);
                float bottom = top + _maskHeight;
                if (obj.y + obj.height < top || obj.y > bottom)
                    return false;
            }
            if (_hScroll)
            {
                float left = _xPerc * (_contentWidth - _maskWidth);
                float right = left + _maskWidth;
                if (obj.x + obj.width < left || obj.x > right)
                    return false;
            }

            return true;
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:19,代码来源:ScrollPane.cs



注:本文中的FairyGUI.GObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Utils.XML类代码示例发布时间:2022-05-24
下一篇:
C# FairyGUI.EventContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap