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

C# TrackableBehaviour类代码示例

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

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



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

示例1: Start

 void Start()
 {
     figura = GetComponent<TrackableBehaviour>();
     if (figura) {
         figura.RegisterTrackableEventHandler (this);
     }
 }
开发者ID:jpm88,项目名称:TriviAR,代码行数:7,代码来源:FrameManager.cs


示例2: OnTrackableStateChanged

    public void OnTrackableStateChanged(
		TrackableBehaviour.Status previousStatus,
		TrackableBehaviour.Status newStatus)
    {
        // Seleciona carta
        int n = Random.Range(1,4); //sorteia numeros de 1 a 3
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED ||
            newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            // Seleciona carta
            if (n == 1){
                card1.GetComponent<SpriteRenderer>().enabled = true;
                card2.GetComponent<SpriteRenderer>().enabled = false;
                card3.GetComponent<SpriteRenderer>().enabled = false;
            }
            if (n == 2){
                card2.GetComponent<SpriteRenderer>().enabled = true;
                card1.GetComponent<SpriteRenderer>().enabled = false;
                card3.GetComponent<SpriteRenderer>().enabled = false;
            }
            if (n == 3){
                card3.GetComponent<SpriteRenderer>().enabled = true;
                card1.GetComponent<SpriteRenderer>().enabled = false;
                card2.GetComponent<SpriteRenderer>().enabled = false;
            }
        }
        else
        {
            card1.GetComponent<SpriteRenderer>().enabled = false;
            card2.GetComponent<SpriteRenderer>().enabled = false;
            card3.GetComponent<SpriteRenderer>().enabled = false;
        }
    }
开发者ID:tatianamika,项目名称:pcs2510,代码行数:34,代码来源:ImageTargetSelectCard.cs


示例3: Create

 // Creates a new Accessor object of the appropriate type. The accessor takes
 // a TrackableBehaviour as a target (the Accessor instance accesses this
 // single object).
 public static TrackableAccessor Create(TrackableBehaviour target)
 {
     if (target is MarkerBehaviour)
     {
         return new MarkerAccessor((MarkerBehaviour)target);
     }
     else if (target is ImageTargetBehaviour)
     {
         return new ImageTargetAccessor((ImageTargetBehaviour)target);
     }
     else if (target is MultiTargetBehaviour)
     {
         return new MultiTargetAccessor((MultiTargetBehaviour)target);
     }
     else if (target is CylinderTargetBehaviour)
     {
         return new CylinderTargetAccessor((CylinderTargetBehaviour)target);
     }
     else
     {
         Debug.LogWarning(target.GetType().ToString() +
                          " is not derived from TrackableBehaviour.");
         return null;
     }
 }
开发者ID:enriqif,项目名称:app000-ikaro,代码行数:28,代码来源:AccessorFactory.cs


示例4: OnTrackableStateChanged

        /// <summary>
        /// Implementation of the ITrackableEventHandler function called when the
        /// tracking state changes.
        /// </summary>
        public void OnTrackableStateChanged(
                                        TrackableBehaviour.Status previousStatus,
                                        TrackableBehaviour.Status newStatus)
        {
            if (newStatus == TrackableBehaviour.Status.DETECTED ||
                newStatus == TrackableBehaviour.Status.TRACKED ||
                newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
            {
                 OnTrackingFound();
                if(this.gameObject.tag == "Map"){
                eventosMarcador.MarcadorEncontrado();
                }

            }
            else
            {
                OnTrackingLost();
                if(this.gameObject.tag == "Map"){
                eventosMarcador.MarcadorPerdido();
                }
            }

            #endregion // PUBLIC_METHODS

            #region PRIVATE_METHODS
        }
开发者ID:gerardoEAH,项目名称:ARTower,代码行数:30,代码来源:DefaultTrackableEventHandler.cs


示例5: Start

 // Use this for initialization
 void Start()
 {
     mTrackableBehaviour = GetComponent<TrackableBehaviour>();
     if (mTrackableBehaviour) {
         mTrackableBehaviour.RegisterTrackableEventHandler(this);
     }
 }
开发者ID:lishanaz,项目名称:Locker,代码行数:8,代码来源:HandTrack.cs


示例6: RemoveEventHandler

	void RemoveEventHandler(GameObject target){
		mTrackableBehaviour = target.GetComponent<TrackableBehaviour>();
		if (mTrackableBehaviour)
		{
			mTrackableBehaviour.UnregisterTrackableEventHandler(this);
		}
	}
开发者ID:carlosm10,项目名称:ProyectoMedicina,代码行数:7,代码来源:Scene_Manager.cs


示例7: OnTrackableStateChanged

	public void OnTrackableStateChanged(	TrackableBehaviour.Status previousStatus,	TrackableBehaviour.Status newStatus){
		if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED){
			mShowMessage = true;	
		}else{
			mShowMessage = false;	
		}
	}
开发者ID:guillepg,项目名称:UnityTest,代码行数:7,代码来源:ButtonPopup.cs


示例8: Start

 void Start()
 {
     mTrackableBehaviour = GetComponent<TrackableBehaviour> ();
             if (mTrackableBehaviour) {
                     Debug.Log ("mTrackableBehaviour found in DefaultTrackableEventHandler");
                     mTrackableBehaviour.RegisterTrackableEventHandler (this);
             }
 }
开发者ID:kyledold,项目名称:AR_App,代码行数:8,代码来源:DefaultTrackableEventHandler.cs


示例9: Start

		void Start () {
			Debug.Log("Pogas sakums");
				mTrackableBehaviour = GetComponent<TrackableBehaviour>();
				if (mTrackableBehaviour)
				{
						mTrackableBehaviour.RegisterTrackableEventHandler(this);
				}
		}
开发者ID:BuLLeTCode,项目名称:Riga_Cathedral_Project,代码行数:8,代码来源:Button.cs


示例10: OnDisable

	void OnDisable()
	{
		mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.UnregisterTrackableEventHandler(this);
        }
	}
开发者ID:jeanfabre,项目名称:PlayMaker--Vuforia4.2--U5,代码行数:8,代码来源:PlayMakerVuforiaTrackableProxy.cs


示例11: Start

		void Start()
		{
			//gameObject.AddComponent<EnemyAI> ();
			mTrackableBehaviour = GetComponent<TrackableBehaviour>();
			if (mTrackableBehaviour)
			{
				mTrackableBehaviour.RegisterTrackableEventHandler(this);
			}
		}
开发者ID:lakshmipathyarjun6,项目名称:R2AR2VirtualOnly,代码行数:9,代码来源:PlayerTrackableEventHandler.cs


示例12: Tracker2

 public Tracker2(TrackableBehaviour b, int i, ConcurQueue<int> q)
 {
     tr = b;
     me = i;
     queue = q;
     if (tr) {
         tr.RegisterTrackableEventHandler (this);
     }
 }
开发者ID:ASchvartzman,项目名称:518Project-ASK,代码行数:9,代码来源:Baseline.cs


示例13: OnTrackableStateChanged

 public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
 {
     bool stateDelta = newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED;
     if (stateDelta){
         ASKWorker askworker = new ASKWorker ();
         Thread clientThread = new Thread(() => askworker.FetchObjects(queue, keys[me]));
         clientThread.Start ();
     }
 }
开发者ID:ASchvartzman,项目名称:518Project-ASK,代码行数:9,代码来源:Baseline.cs


示例14: Awake

	void Awake()
	{
		_transform = transform;
		_trackableBehaviour = GetComponent<TrackableBehaviour>();
		if (_trackableBehaviour)
		{
			_trackableBehaviour.RegisterTrackableEventHandler(this);
		}
	}
开发者ID:ricardoAtXTeam,项目名称:ARClimberPrototypeAlpha,代码行数:9,代码来源:ARController.cs


示例15: Start

        void Start()
        {
            mTrackableBehaviour = GetComponent<TrackableBehaviour>();
            if (mTrackableBehaviour)
            {
                mTrackableBehaviour.RegisterTrackableEventHandler(this);
            }

            transform.SetParent(scene.transform);
        }
开发者ID:Doku0911,项目名称:TeamSotsuten,代码行数:10,代码来源:DefaultTrackableEventHandler.cs


示例16: Start

 void Start()
 {
     mTrackableBehaviour = GetComponent<TrackableBehaviour>();
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.RegisterTrackableEventHandler(this);
     }
     //FindObjectOfType<Subtitles>().StartSubtitles();
     //FindObjectOfType<Subtitles2>().StartSubtitles();
 }
开发者ID:Riyusaki,项目名称:testing,代码行数:10,代码来源:ImageTargetPlayAudio.cs


示例17: OnTrackableStateChanged

 public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
 {
     Debug.Log ("OnTrackableStateChanged = " + newStatus.ToString ());
             if (newStatus == TrackableBehaviour.Status.DETECTED ||
                     newStatus == TrackableBehaviour.Status.TRACKED) {
                     OnTrackingFound ();
             } else {
                     OnTrackingLost ();
             }
 }
开发者ID:nileshlg2003,项目名称:AR_App,代码行数:10,代码来源:VegasTouchHandler.cs


示例18: OnTrackableStateChanged

    public void OnTrackableStateChanged(
		TrackableBehaviour.Status previousStatus,
		TrackableBehaviour.Status newStatus)
    {
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED)
        {
            OnTrackingFound();
        }
    }
开发者ID:hilagutfreund,项目名称:cs4172-finalProj,代码行数:10,代码来源:MyPrefabInstantiator.cs


示例19: Start

 void Start()
 {
     // Get GameManager instance
     gameManager = GameManager.Instance();
     mTrackableBehaviour = GetComponent<TrackableBehaviour>();
     if (mTrackableBehaviour)
     {
         mTrackableBehaviour.RegisterTrackableEventHandler(this);
     }
 }
开发者ID:khoavnguyen,项目名称:Unity-AR-Game-Explode-with-Friends,代码行数:10,代码来源:DefaultTrackableEventHandler.cs


示例20: OnTrackableStateChanged

    public void OnTrackableStateChanged(
		TrackableBehaviour.Status previousStatus,
		TrackableBehaviour.Status newStatus)
    {
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED ||
            newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) {
            isTracked = true;
        } else
            isTracked = false;
    }
开发者ID:lishanaz,项目名称:Locker,代码行数:11,代码来源:HandTrack.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# TrackedDeviceProperty类代码示例发布时间:2022-05-24
下一篇:
C# TrackData类代码示例发布时间: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