当前位置: 首页>>代码示例>>C#>>正文


C# UIEventTrigger类代码示例

本文整理汇总了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;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:10,代码来源:UIEventTrigger.cs

示例2: OnDragEnd

 private void OnDragEnd()
 {
     if (UIEventTrigger.current != null)
     {
         return;
     }
     UIEventTrigger.current = this;
     EventDelegate.Execute(this.onDragEnd);
     UIEventTrigger.current = null;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:10,代码来源:UIEventTrigger.cs

示例3: OnDrag

 private void OnDrag(Vector2 delta)
 {
     if (UIEventTrigger.current != null)
     {
         return;
     }
     UIEventTrigger.current = this;
     EventDelegate.Execute(this.onDrag);
     UIEventTrigger.current = null;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:10,代码来源:UIEventTrigger.cs

示例4: OnDoubleClick

 private void OnDoubleClick()
 {
     if (UIEventTrigger.current != null)
     {
         return;
     }
     UIEventTrigger.current = this;
     EventDelegate.Execute(this.onDoubleClick);
     UIEventTrigger.current = null;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:10,代码来源:UIEventTrigger.cs

示例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));
	}
开发者ID:CryptArc,项目名称:UnitySlots,代码行数:12,代码来源:UIEventTriggerEditor.cs

示例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));
	}
开发者ID:reaganq,项目名称:MagnetBots_unity,代码行数:16,代码来源:UIEventTriggerEditor.cs

示例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;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:17,代码来源:UIEventTrigger.cs

示例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;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:17,代码来源:UIEventTrigger.cs

示例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;
        }
开发者ID:ShipuW,项目名称:unity-study,代码行数:31,代码来源:TouchButton.cs

示例10: OnPress

	void OnPress (bool pressed)
	{
		current = this;
		if (pressed) EventDelegate.Execute(onPress);
		else EventDelegate.Execute(onRelease);
		current = null;
	}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:7,代码来源:UIEventTrigger.cs

示例11: OnDragOut

	void OnDragOut (GameObject go)
	{
		if (current != null) return;
		current = this;
		EventDelegate.Execute(onDragOut);
		current = null;
	}
开发者ID:onelei,项目名称:ChatBubbleOfUnity,代码行数:7,代码来源:UIEventTrigger.cs

示例12: OnDragEnd

	void OnDragEnd ()
	{
		if (current != null) return;
		current = this;
		EventDelegate.Execute(onDragEnd);
		current = null;
	}
开发者ID:zhang00lei,项目名称:2048,代码行数:7,代码来源:UIEventTrigger.cs

示例13: OnHover

	void OnHover (bool isOver)
	{
		current = this;
		if (isOver) EventDelegate.Execute(onHoverOver);
		else EventDelegate.Execute(onHoverOut);
		current = null;
	}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:7,代码来源:UIEventTrigger.cs

示例14: OnDoubleClick

	void OnDoubleClick ()
	{
		if (current != null || !isColliderEnabled) return;
		current = this;
		EventDelegate.Execute(onDoubleClick);
		current = null;
	}
开发者ID:ChungH,项目名称:BNG,代码行数:7,代码来源:UIEventTrigger.cs

示例15: OnDoubleClick

	void OnDoubleClick ()
	{
		if (current != null) return;
		current = this;
		EventDelegate.Execute(onDoubleClick);
		current = null;
	}
开发者ID:onelei,项目名称:ChatBubbleOfUnity,代码行数:7,代码来源:UIEventTrigger.cs


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