예제 #1
0
 private void On_BAnchor_BAnchorRayHoverExit(BAnchor bAnchor)
 {
     if (boundingBox)
     {
         boundingBox.SetActive(false);
     }
 }
예제 #2
0
        private void On_BAnchor_BAnchorRaySelected(BAnchor bAnchor)
        {
            if (CanPlaceBAnchor == true &&
                IS_NOT_NULL(ARCursor.Instance))
            {
                bool succeeded = false;
                if (IsPlacing == false)
                {
                    succeeded = ARManager.Instance.OnStartPlacingBAnchor(this, bAnchor);
                }
                else
                {
                    succeeded = ARManager.Instance.OnStopPlacingBAnchor(this, bAnchor);
                }

                if (succeeded == true)
                {
                    if (IsPlacing == false)
                    {
                        IsPlacing = true;
                        InvokeEventIfBound(StartedPlacing, bAnchor);
                    }
                    else
                    {
                        IsPlacing = false;
                        InvokeEventIfBound(EndedPlacing, bAnchor);
                    }
                }
            }
        }
예제 #3
0
 private void On_BAnchor_BAnchorRayHoverEnter(BAnchor bAnchor)
 {
     if (boundingBox)
     {
         boundingBox.SetActive(true);
     }
 }
예제 #4
0
        public void SpawnTestBAnchor()
        {
            BAnchor testBAnchorPrefab = Resources.Load <BAnchor>(BConsts.PATH_AR_TestBAnchor);

            if (IS_NOT_NULL(testBAnchorPrefab))
            {
                ARManager.Instance.SpawnBAnchorAtCursorPosition(testBAnchorPrefab, true);
            }
        }
예제 #5
0
        private void On_BAnchorCursorPlacer_EndedPlacing(BAnchor bAnchor)
        {
            PlayAreaBAnchor playAreaBAnchor = (PlayAreaBAnchor)bAnchor;

            if (IS_NOT_NULL(playAreaBAnchor) &&
                (ARE_EQUAL(playAreaBAnchor, this)))
            {
                InvokeEventIfBound(EndedPlacing, this);
            }
        }
예제 #6
0
        protected override void OnValidate()
        {
            base.OnValidate();

            if (CanValidate() == false)
            {
                return;
            }

            if (bAnchor == null)
            {
                bAnchor = GetComponentInHierarchy <BAnchor>();
            }
        }
예제 #7
0
        private void On_CameraRayCaster_OnRayCastableExit(IRayCastable rayCastable)
        {
            BAnchor bAnchor = (BAnchor)rayCastable;

            if (bAnchor &&
                bAnchor == raycastedBAnchor)
            {
                raycastedBAnchor = null;
                if (IS_NOT_NULL(bButton))
                {
                    bButton.DisableButton();
                }
            }
        }
예제 #8
0
        private void On_CameraRayCaster_OnRayCastableEnter(IRayCastable rayCastable)
        {
            BAnchor bAnchor = (BAnchor)rayCastable;

            if (bAnchor)
            {
                raycastedBAnchor = bAnchor;

                if (IS_NOT_NULL(bButton))
                {
                    bButton.EnableButton();
                }
            }
        }
예제 #9
0
        protected override void Awake()
        {
            base.Awake();

            // Initialize Banchor Collection Map
            foreach (BAnchorCollectionTupple bAnchorCollectionTupple in bAnchorCollectionTupples)
            {
                string  bAnchorID     = bAnchorCollectionTupple.BAnchorID;
                BAnchor bAnchorPrefab = bAnchorCollectionTupple.BAnchorPrefab;
                if (IS_KEY_NOT_CONTAINED(bAnchorCollectionMap, bAnchorID) &&
                    IS_NOT_NULL(bAnchorPrefab))
                {
                    bAnchorCollectionMap.Add(bAnchorID, bAnchorPrefab);
                }
            }
        }
예제 #10
0
        //private float lastTimeReplicated;

        #endregion

        #region Life Cycle
        protected override void OnValidate()
        {
            base.OnValidate();

            if (CanValidate())
            {
                if (bAnchor == null)
                {
                    bAnchor = GetComponentInHierarchy <BAnchor>();
                }

                if (bAnchor != null)
                {
                    bAnchorID = bAnchor.BAnchorID;
                }
            }
        }
예제 #11
0
        protected override void OnValidate()
        {
            base.OnValidate();

            if (CanValidate() == false)
            {
                return;
            }

            if (bAnchor == null)
            {
                bAnchor = GetComponent <BAnchor>();
            }
            if (debugText == null)
            {
                debugText = GetComponent <BText>();
            }
        }
예제 #12
0
 public BAnchorCollectionTupple(string bAnchorID, BAnchor bAnchorPrefab)
 {
     BAnchorID     = bAnchorID;
     BAnchorPrefab = bAnchorPrefab;
 }