本文整理汇总了C#中FairyGUI.GObject类的典型用法代码示例。如果您正苦于以下问题:C# GObject类的具体用法?C# GObject怎么用?C# GObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GObject类属于FairyGUI命名空间,在下文中一共展示了GObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GearBase
public GearBase(GObject owner)
{
_owner = owner;
pageSet = new PageOptionSet();
easeType = Ease.OutQuad;
tweenTime = 0.3f;
}
示例2: GearBase
public GearBase(GObject owner)
{
_owner = owner;
easeType = Ease.OutQuad;
tweenTime = 0.3f;
delay = 0;
}
示例3: ReturnObject
public void ReturnObject(GObject obj)
{
string url = obj.resourceURL;
Queue<GObject> arr;
if (_pool.TryGetValue(url, out arr))
arr.Enqueue(obj);
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例12: TogglePopup
/// <summary>
///
/// </summary>
/// <param name="popup"></param>
/// <param name="target"></param>
public void TogglePopup(GObject popup, GObject target)
{
TogglePopup(popup, target, null);
}
示例13: ShowTooltipsWin
/// <summary>
///
/// </summary>
/// <param name="tooltipWin"></param>
public void ShowTooltipsWin(GObject tooltipWin)
{
HideTooltips();
_tooltipWin = tooltipWin;
Timers.inst.Add(0.1f, 1, __showTooltipsWin);
}
示例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;
}
示例15: ScrollToView
public void ScrollToView(GObject obj)
{
ScrollToView(obj, false);
}