本文整理汇总了C#中UIEventTrigger类的典型用法代码示例。如果您正苦于以下问题:C# UIEventTrigger类的具体用法?C# UIEventTrigger怎么用?C# UIEventTrigger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIEventTrigger类属于命名空间,在下文中一共展示了UIEventTrigger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDragOut
private void OnDragOut(GameObject go)
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
EventDelegate.Execute(this.onDragOut);
UIEventTrigger.current = null;
}
示例2: OnDragEnd
private void OnDragEnd()
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
EventDelegate.Execute(this.onDragEnd);
UIEventTrigger.current = null;
}
示例3: OnDrag
private void OnDrag(Vector2 delta)
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
EventDelegate.Execute(this.onDrag);
UIEventTrigger.current = null;
}
示例4: OnDoubleClick
private void OnDoubleClick()
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
EventDelegate.Execute(this.onDoubleClick);
UIEventTrigger.current = null;
}
示例5: OnEnable
void OnEnable ()
{
mTrigger = target as UIEventTrigger;
EditorPrefs.SetBool("ET0", EventDelegate.IsValid(mTrigger.onHoverOver));
EditorPrefs.SetBool("ET1", EventDelegate.IsValid(mTrigger.onHoverOut));
EditorPrefs.SetBool("ET2", EventDelegate.IsValid(mTrigger.onPress));
EditorPrefs.SetBool("ET3", EventDelegate.IsValid(mTrigger.onRelease));
EditorPrefs.SetBool("ET4", EventDelegate.IsValid(mTrigger.onSelect));
EditorPrefs.SetBool("ET5", EventDelegate.IsValid(mTrigger.onDeselect));
EditorPrefs.SetBool("ET6", EventDelegate.IsValid(mTrigger.onClick));
EditorPrefs.SetBool("ET7", EventDelegate.IsValid(mTrigger.onDoubleClick));
}
示例6: OnEnable
void OnEnable ()
{
mTrigger = target as UIEventTrigger;
EditorPrefs.SetFloat("ET11", mTrigger.movementThreshold);
EditorPrefs.SetBool("ET0", EventDelegate.IsValid(mTrigger.onHoverOver));
EditorPrefs.SetBool("ET1", EventDelegate.IsValid(mTrigger.onHoverOut));
EditorPrefs.SetBool("ET2", EventDelegate.IsValid(mTrigger.onPress));
EditorPrefs.SetBool("ET3", EventDelegate.IsValid(mTrigger.onRelease));
EditorPrefs.SetBool("ET4", EventDelegate.IsValid(mTrigger.onSelect));
EditorPrefs.SetBool("ET5", EventDelegate.IsValid(mTrigger.onDeselect));
EditorPrefs.SetBool("ET6", EventDelegate.IsValid(mTrigger.onClick));
EditorPrefs.SetBool("ET7", EventDelegate.IsValid(mTrigger.onDoubleClick));
EditorPrefs.SetBool("ET8", EventDelegate.IsValid(mTrigger.onDragOver));
EditorPrefs.SetBool("ET9", EventDelegate.IsValid(mTrigger.onDragOut));
EditorPrefs.SetBool("ET10", EventDelegate.IsValid(mTrigger.onCustomRelease));
}
示例7: OnSelect
private void OnSelect(bool selected)
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
if (selected)
{
EventDelegate.Execute(this.onSelect);
}
else
{
EventDelegate.Execute(this.onDeselect);
}
UIEventTrigger.current = null;
}
示例8: OnHover
private void OnHover(bool isOver)
{
if (UIEventTrigger.current != null)
{
return;
}
UIEventTrigger.current = this;
if (isOver)
{
EventDelegate.Execute(this.onHoverOver);
}
else
{
EventDelegate.Execute(this.onHoverOut);
}
UIEventTrigger.current = null;
}
示例9: Start
// Use this for initialization
private void Start()
{
// //
// m_TweenPosition = this.GetComponent<TweenPosition>();
//
// if( m_TweenPosition == null )
// {
// Debug.LogError( "There's not a Component:'TweenPosition'.", this );
// return;
// }
m_EventTrigger = this.GetComponent<UIEventTrigger>();
if( m_EventTrigger == null )
{
Debug.LogError("There's not a compoment:'UIEventTrigger'.",this);
return;
}
//
if( m_ToolTip == null )
Debug.LogWarning( "The ToolTip has not assigned.", this );
EventDelegate.Add(m_EventTrigger.onClick,this.OnClick);
//EventDelegate.Add(m_EventTrigger.onDragOver,this.OnDragOver);
//
m_bInit = true;
}
示例10: OnPress
void OnPress (bool pressed)
{
current = this;
if (pressed) EventDelegate.Execute(onPress);
else EventDelegate.Execute(onRelease);
current = null;
}
示例11: OnDragOut
void OnDragOut (GameObject go)
{
if (current != null) return;
current = this;
EventDelegate.Execute(onDragOut);
current = null;
}
示例12: OnDragEnd
void OnDragEnd ()
{
if (current != null) return;
current = this;
EventDelegate.Execute(onDragEnd);
current = null;
}
示例13: OnHover
void OnHover (bool isOver)
{
current = this;
if (isOver) EventDelegate.Execute(onHoverOver);
else EventDelegate.Execute(onHoverOut);
current = null;
}
示例14: OnDoubleClick
void OnDoubleClick ()
{
if (current != null || !isColliderEnabled) return;
current = this;
EventDelegate.Execute(onDoubleClick);
current = null;
}
示例15: OnDoubleClick
void OnDoubleClick ()
{
if (current != null) return;
current = this;
EventDelegate.Execute(onDoubleClick);
current = null;
}