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


C# TrackableBehaviour类代码示例

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


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


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