Exemplo n.º 1
0
 public void ActivateSnapping()
 {
     if (snapState == SnapState.UnsnappedAndUnsnappable)
     {
         snapState = SnapState.UnsnappedAndSnappable;
     }
 }
Exemplo n.º 2
0
 void Snap()
 {
     Debug.Log("Snap");
     snapState = SnapState.IsWaitingForRelease;
     Array.ForEach(snapAreaEnters, s => s.SnapEnter(iteamReadyToSnap));
     snappedItem = iteamReadyToSnap;
 }
    public void ActivateSnapping()
    {
        if(snapState == SnapState.UnsnappedAndUnsnappable){
            snapState = SnapState.UnsnappedAndSnappable;

        }
    }
Exemplo n.º 4
0
 void SnapCanceled(GrabbableEventArgs args)
 {
     Debug.Log("SnapCanceled");
     grabber.GrabGrabbable(snappedItem);
     Array.ForEach(snapCalceled, s => s.SnapCanceled(args));
     snappedItem = null;
     snapState   = SnapState.None;
 }
Exemplo n.º 5
0
 void OnDisable()
 {
     if (_snapCoroutine != null)
     {
         _rb.isKinematic = false;
         SnapState       = SnapState.Idle;
         StopCoroutine(_snapCoroutine);
         _snapCoroutine = null;
     }
 }
        private void BuildMenuSnapping()
        {
            EditorGUI.BeginDisabledGroup(menus.Count <= 0 || layers.Count <= 0);
            GUILayout.Label("Snapping", EditorStyles.boldLabel);
            //Actions
            EditorGUILayout.BeginHorizontal();

            if (GUILayout.Toggle(snapState == SnapState.Center, "Center", "Button"))
            {
                snapState = SnapState.Center;
            }

            if (GUILayout.Toggle(snapState == SnapState.Down, "Down", "Button"))
            {
                snapState = SnapState.Down;
            }

            if (GUILayout.Toggle(snapState == SnapState.Up, "Up", "Button"))
            {
                snapState = SnapState.Up;
            }

            if (GUILayout.Toggle(snapState == SnapState.Left, "Left", "Button"))
            {
                snapState = SnapState.Left;
            }

            if (GUILayout.Toggle(snapState == SnapState.Right, "Right", "Button"))
            {
                snapState = SnapState.Right;
            }

            if (GUILayout.Toggle(snapState == SnapState.UpLeft, "Up Left", "Button"))
            {
                snapState = SnapState.UpLeft;
            }

            if (GUILayout.Toggle(snapState == SnapState.UpRight, "Up Right", "Button"))
            {
                snapState = SnapState.UpRight;
            }

            if (GUILayout.Toggle(snapState == SnapState.DownLeft, "Down Left", "Button"))
            {
                snapState = SnapState.DownLeft;
            }

            if (GUILayout.Toggle(snapState == SnapState.DownRight, "Down Right", "Button"))
            {
                snapState = SnapState.DownRight;
            }

            EditorGUILayout.EndHorizontal();
            EditorGUI.EndDisabledGroup();
        }
Exemplo n.º 7
0
    private void Unsnap()
    {
        Debug.Log("Unsnap");
        Array.ForEach(unsnaps, s => s.OnUnsnap(null));

        SetColliders(true);
        SetRigidbody(false);
        grabber.GrabGrabbable(snappedItem);
        snappedItem = null;
        snapState   = SnapState.None;
    }
Exemplo n.º 8
0
        void Release()
        {
            SnapState = SnapState.Releasing;
            CurrentlySnappedTo.OnRelease();
            CurrentlySnappedTo = null;
            transform.SetParent(_unsnappedParent, true);
            _rb.isKinematic = false;
            SnapState       = SnapState.Idle;

            if (OnRelease != null)
            {
                OnRelease();
            }
        }
Exemplo n.º 9
0
    void SnapOnBegining()
    {
        if (snappedItem == null)
        {
            return;
        }

        snappedItem.GetComponent <Rigidbody>().isKinematic      = true;
        snappedItem.GetComponentInChildren <Collider>().enabled = false;
        snappedItem.GetComponent <Grabbable>().enabled          = false;
        snappedItem.transform.SetParent(transform);
        snappedItem.transform.localPosition = Vector3.zero;

        iteamReadyToSnap = snappedItem;
        snapState        = SnapState.Snapped;
        Array.ForEach(snapBegining, s => s.Init(iteamReadyToSnap));
    }
Exemplo n.º 10
0
 public void OnGrabRelease(GrabbableEventArgs args)
 {
     if (snappedItem == null)
     {
         return;
     }
     Debug.Log("GrabRelease: " + args.grabber.HeldGrabbable);
     if (args.grabber == this)
     {
         Debug.Log("to slot wiec wychodze");
         return;
     }
     snapState = SnapState.Snapped;
     snappedItem.transform.SetParent(transform, true);
     SetColliders(false);
     SetRigidbody(true);
     Array.ForEach(snapReleases, s => s.OnRelease(args.grabbable));
 }
Exemplo n.º 11
0
 public void Snap(float offsetInPixels, ManipulateEdges edges)
 {
     this.m_ManipulateEdges = edges;
     if (offsetInPixels <= -MagnetEngine.k_Epsilon || offsetInPixels >= MagnetEngine.k_Epsilon)
     {
         if (this.m_Magnets.Count != 0)
         {
             SnapState snapState = this.m_SnapState;
             if (snapState != SnapState.Free)
             {
                 if (snapState == SnapState.Snapped)
                 {
                     this.ProcessSnappedState(offsetInPixels);
                 }
             }
             else
             {
                 this.ProcessFreeState(offsetInPixels);
             }
         }
     }
 }
Exemplo n.º 12
0
        public List <SnapPoint> GetSnapPoints(SnapState state)
        {
            var ret = new List <SnapPoint>();

            foreach (var snapMode in state.EnabledSnapModes)
            {
                switch (snapMode)
                {
                case SnapState.SnapMode.Wireframe:
                    ret.Add(new SnapPoint(this.StartPoint, SnapState.SnapType.END));
                    ret.Add(new SnapPoint(this.MidPoint, SnapState.SnapType.MID));
                    ret.Add(new SnapPoint(this.EndPoint, SnapState.SnapType.END));
                    break;

                //case SnapMode.Solid:
                //    var temp = p.GetSnapPoint();
                //    temp.ForEach(item => snapPoints.Add(new SnapPoint(item, SnapType.QUAD)));
                //    break;
                default:
                    break;
                }
            }
            return(ret);
        }
Exemplo n.º 13
0
    // Update is called once per frame
    void Update()
    {
        if (PSMoveInput.IsConnected == true)
        {
            controller = PSMoveInput.MoveControllers[index];
            moveData   = controller.Data;

            if (controller.Connected == true && moveData != null)
            {
                string buttonsSt = "" + moveData.Buttons;

                bool isTriggerDown = moveData.Buttons == MoveButton.T || (psMoveWraper.gyroEnabled && psMoveWraper.gyroAnalogScale && moveData.ValueT >= psMoveWraper.gyroAnalogMin);

                if (moveData.Buttons == MoveButton.Start && isCalibrationEnabled == true)
                {
                    isCalibrationEnabled = false;
                    LeanTween.delayedCall(1f, () => {
                        isCalibrationEnabled = true;
                    });
                    psMoveWraper.CalibratePlayer(index);
                }
                else if ((buttonsSt == "Square, T" || buttonsSt == "T, Square" || moveData.Buttons == MoveButton.Square) && curShape != Shape.SQUARE && snapState == SnapState.UnsnappedAndSnappable)
                {
                    changeShape(Shape.SQUARE);
                }
                else if ((buttonsSt == "Triangle, T" || buttonsSt == "T, Triangle" || moveData.Buttons == MoveButton.Triangle) && curShape != Shape.TRIANGLE && snapState == SnapState.UnsnappedAndSnappable)
                {
                    changeShape(Shape.TRIANGLE);
                }
                else if ((buttonsSt == "Circle, T" || buttonsSt == "T, Circle" || moveData.Buttons == MoveButton.Circle) && curShape != Shape.CIRCLE && snapState == SnapState.UnsnappedAndSnappable)
                {
                    changeShape(Shape.CIRCLE);
                }
                else if ((buttonsSt == "Cross, T" || buttonsSt == "T, Cross" || moveData.Buttons == MoveButton.Cross) && curShape != Shape.CROSS && snapState == SnapState.UnsnappedAndSnappable)
                {
                    changeShape(Shape.CROSS);
                }
                else if (isTriggerDown)
                {
                    if (!playedTriggerSound)
                    {
                        AudioManager.Main.PlayNewSound("Puzzle_lock");
                        playedTriggerSound = true;
                    }

                    // Update border particles
                    if (!GetComponent <ParticleManager> ().IsPlaying() && this.snapState != SnapState.SnappedAndUnsnappable)
                    {
                        GetComponent <ParticleManager> ().Play();
                    }
                    else if (GetComponent <ParticleManager> ().IsPlaying() && this.snapState == SnapState.SnappedAndUnsnappable)
                    {
                        GetComponent <ParticleManager> ().Stop();
                    }

                    if (!psMoveWraper.gyroEnabled)
                    {
                        Vector3 curScale = gameObject.transform.localScale;
                        if (prevZPosition == 0f)
                        {
                            prevZPosition  = (float)Math.Round((double)moveData.Position.z, 1);
                            isRaisingScale = 0;
                        }

                        float curZPosition = (float)Math.Round((double)moveData.Position.z, 1);

                        if (curZPosition > prevZPosition)
                        {
                            isRaisingScale = 1;
                        }
                        else if (curZPosition < prevZPosition)
                        {
                            isRaisingScale = -1;
                        }
                        else
                        {
                            isRaisingScale = 0;
                        }

                        prevZPosition = (float)Math.Round((double)moveData.Position.z, 1);

                        if (isRaisingScale == 1)
                        {
                            gameObject.transform.localScale = new Vector3(minScale, minScale, minScale) * Mathf.Clamp(curScale.x + (Time.deltaTime * scaleSpeed), minScale, maxScale);
                        }
                        else if (isRaisingScale == -1)
                        {
                            gameObject.transform.localScale = new Vector3(minScale, minScale, minScale) * Mathf.Clamp(curScale.x - (Time.deltaTime * scaleSpeed), minScale, maxScale);
                        }
                        else
                        {
                            isRaisingScale = 0;
                        }
                    }
                }
                else
                {
                    isRaisingScale     = 0;
                    playedTriggerSound = false;
                    if (snapState == SnapState.SnappedAndUnsnappable)
                    {
                        if (moveData.ValueT == 0 && psMoveWraper.isHandleActive[index] == false)
                        {
                            snapState = SnapState.UnsnappedAndUnsnappable;
                            enablePlayer();
                        }
                    }
                }

                // Update border particles
                if (!isTriggerDown && GetComponent <ParticleManager>().IsPlaying())
                {
                    GetComponent <ParticleManager>().Stop();
                }
            }
        }


        if (((Input.GetKey(KeyCode.Keypad1) == true || Input.GetKey(KeyCode.Alpha1) == true) && index == 0) || ((Input.GetKey(KeyCode.Keypad2) == true || Input.GetKey(KeyCode.Alpha2) == true) && index == 1) || ((Input.GetKey(KeyCode.Keypad3) == true || Input.GetKey(KeyCode.Alpha3) == true) && index == 2))
        {
            checkKeyboardControls();
        }
    }
Exemplo n.º 14
0
 private void ChangeState(SnapState newState)
 {
     this.m_SnapState = newState;
 }
Exemplo n.º 15
0
        public IEnumerator SnapCoroutine()
        {
            SnapState       = SnapState.Snapping;
            _rb.isKinematic = true;
            var wasGrabbable = _interactableItem.IsGrabbable;

            _interactableItem.IsGrabbable = false;
            yield return(null);

            if (!CanSnap)
            {
                _rb.isKinematic = false;
                _interactableItem.IsGrabbable = wasGrabbable;
                _snapCoroutine = null;
                SnapState      = SnapState.Idle;
                yield break;
            }

            SnapTarget snapTarget = _targetsInRange.Where(target => target.CurrentlySnapped == null).OrderBy(target => Quaternion.Angle(transform.rotation, target.transform.rotation)).First();

            //Making sure the item is handled correctly with the hands.
            _interactableItem.DisableCollision();
            _interactableItem.Detach();
            _rb.isKinematic = true;

            snapTarget.OnSnap(this);

            Vector3 targetScale = Vector3.one;

            switch (ScaleBehaviour)
            {
            case ScaleBehaviour.RetainScale:
                targetScale = transform.localScale;
                break;

            case ScaleBehaviour.InheritFromTarget:
                targetScale = snapTarget.transform.localScale;
                break;

            case ScaleBehaviour.CustomScale:
                targetScale = _customScale;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            //Bind funcs to prevent code repetition.
            Func <float> getDist  = () => Vector3.Distance(transform.position, snapTarget.transform.position);
            Func <float> getAngle = () => Quaternion.Angle(transform.rotation, snapTarget.transform.rotation);

            //Calculate what amount of translation and rotation should be applied per frame.
            float angleDelta = getAngle() / (SnapTime / Time.fixedDeltaTime);
            float distDelta  = getDist() / (SnapTime / Time.fixedDeltaTime);

            //Setting the transform to the target transform over a certain time.
            while (getDist() > 0.0001f || getAngle() > 0.001f)
            {
                transform.position = Vector3.MoveTowards(transform.position, snapTarget.transform.position, distDelta);
                transform.rotation = Quaternion.RotateTowards(transform.rotation, snapTarget.transform.rotation, angleDelta);

                if (ScaleBehaviour != ScaleBehaviour.RetainScale)
                {
                    transform.localScale = Vector3.MoveTowards(transform.localScale, targetScale, distDelta);
                }
                yield return(new WaitForFixedUpdate());
            }

            _interactableItem.EnableCollision();
            CurrentlySnappedTo = snapTarget;
            transform.SetParent(snapTarget.transform, true);
            SnapState = SnapState.Snapped;

            if (OnSnap != null)
            {
                OnSnap();
            }

            yield return(new WaitUntil(() => _detectors.Sum(detector => detector.GetCollidingObjectsInLayer(Layer.Phalange).Count()) == 0));

            _interactableItem.IsGrabbable = wasGrabbable;
            _snapCoroutine = null;
        }
Exemplo n.º 16
0
        public bool UpdateState(T snapHit, object userData = null)
        {
            bool bStateChanged = false;

            // update state machine
            if (snapHit != null)
            {
                if (eState == SnapState.NoSnap)
                {
                    // have no snap, transition to pending snap

                    eState            = SnapState.PendingSnapChange;
                    PendingSnapTarget = snapHit;
                    PendingSnapData   = userData;
                    startPending      = FPlatform.RealTime();
                    bStateChanged     = true;
                }
                else if (eState == SnapState.Snapped)
                {
                    if (snapHit.IsSame(ActiveSnapTarget) == false)
                    {
                        // snapped but got new target, transition to pending-change state
                        eState            = SnapState.PendingSnapChange;
                        PendingSnapTarget = snapHit;
                        PendingSnapData   = userData;
                        startPending      = FPlatform.RealTime();
                        bStateChanged     = true;
                    }
                    else
                    {
                        // same "snap point" but incoming hit might have new data, so switch to it
                        ActiveSnapTarget = snapHit;
                        ActiveSnapData   = userData;
                        bStateChanged    = true;
                    }
                }
                else if (eState == SnapState.PendingSnapChange)
                {
                    // ? we could have a state here where if we see current active, we switch back
                    //   to snappend state? this might stabilize in noisy conditions...

                    if (snapHit.IsSame(PendingSnapTarget) == false)
                    {
                        // in pending but got new pending target, stay in pending, reset timer
                        PendingSnapTarget = snapHit;
                        PendingSnapData   = userData;
                        startPending      = FPlatform.RealTime();
                    }
                    else if (FPlatform.RealTime() - startPending > SnapDelay)
                    {
                        // delay elapsed, transition to snapped with pending target set as active
                        eState            = SnapState.Snapped;
                        ActiveSnapTarget  = PendingSnapTarget;
                        PendingSnapTarget = null;
                        ActiveSnapData    = PendingSnapData;
                        PendingSnapData   = null;
                        bStateChanged     = true;
                    }
                }
            }
            else            // no-hit branch

            {
                if (eState == SnapState.Snapped)
                {
                    // currently snapped but got a null target, transition to pending-nosnap state
                    eState            = SnapState.PendingSnapChange;
                    PendingSnapTarget = null;
                    PendingSnapData   = null;
                    startPending      = FPlatform.RealTime();
                    bStateChanged     = true;
                }
                else if (eState == SnapState.PendingSnapChange)
                {
                    if (PendingSnapTarget != null)
                    {
                        // in pending but got a no-hit, transition to pending-nosnap
                        PendingSnapTarget = null;
                        PendingSnapData   = null;
                        startPending      = FPlatform.RealTime();
                    }
                    else if (FPlatform.RealTime() - startPending > SnapDelay)
                    {
                        // in pending and timer elapsed, transition to no-snap state
                        eState           = SnapState.NoSnap;
                        ActiveSnapTarget = null;
                        ActiveSnapData   = null;
                        bStateChanged    = true;
                    }
                }
            }

            return(bStateChanged);
        }
    // Update is called once per frame
    void Update()
    {
        if (PSMoveInput.IsConnected == true) {
            controller = PSMoveInput.MoveControllers[index];
            moveData = controller.Data;

            if (controller.Connected == true && moveData != null) {
                string buttonsSt = ""+moveData.Buttons;

                bool isTriggerDown = moveData.Buttons == MoveButton.T || (psMoveWraper.gyroEnabled && psMoveWraper.gyroAnalogScale && moveData.ValueT >= psMoveWraper.gyroAnalogMin);

                if(moveData.Buttons == MoveButton.Start && isCalibrationEnabled == true){
                    isCalibrationEnabled = false;
                    LeanTween.delayedCall(1f,()=>{
                        isCalibrationEnabled = true;
                    });
                    psMoveWraper.CalibratePlayer(index);

                }
                else if ((buttonsSt == "Square, T" || buttonsSt == "T, Square" || moveData.Buttons == MoveButton.Square) && curShape != Shape.SQUARE && snapState == SnapState.UnsnappedAndSnappable) {
                    changeShape(Shape.SQUARE);
                }
                else if ((buttonsSt == "Triangle, T" || buttonsSt == "T, Triangle" || moveData.Buttons == MoveButton.Triangle) && curShape != Shape.TRIANGLE && snapState == SnapState.UnsnappedAndSnappable) {
                    changeShape(Shape.TRIANGLE);

                }
                else if ((buttonsSt == "Circle, T" || buttonsSt == "T, Circle" || moveData.Buttons == MoveButton.Circle) && curShape != Shape.CIRCLE && snapState == SnapState.UnsnappedAndSnappable) {
                    changeShape(Shape.CIRCLE);

                }
                else if ((buttonsSt == "Cross, T" || buttonsSt == "T, Cross" || moveData.Buttons == MoveButton.Cross) && curShape != Shape.CROSS && snapState == SnapState.UnsnappedAndSnappable) {
                    changeShape(Shape.CROSS);

                }
                else if (isTriggerDown) {
                    if(!playedTriggerSound) {
                        AudioManager.Main.PlayNewSound("Puzzle_lock");
                        playedTriggerSound = true;
                    }

                    // Update border particles
                    if (!GetComponent<ParticleManager> ().IsPlaying () && this.snapState != SnapState.SnappedAndUnsnappable) {
                        GetComponent<ParticleManager> ().Play ();
                    } else if (GetComponent<ParticleManager> ().IsPlaying () && this.snapState == SnapState.SnappedAndUnsnappable) {
                        GetComponent<ParticleManager> ().Stop ();
                    }

                    if (!psMoveWraper.gyroEnabled) {

                        Vector3 curScale = gameObject.transform.localScale;
                        if(prevZPosition == 0f){
                            prevZPosition = (float) Math.Round((double)moveData.Position.z, 1) ;
                            isRaisingScale = 0;
                        }

                        float curZPosition = (float) Math.Round((double)moveData.Position.z, 1) ;

                        if(curZPosition > prevZPosition){
                            isRaisingScale = 1;
                        }
                        else if(curZPosition < prevZPosition){
                            isRaisingScale = -1;
                        }
                        else{
                            isRaisingScale = 0;
                        }

                        prevZPosition = (float) Math.Round((double) moveData.Position.z, 1);

                        if(isRaisingScale == 1){
                            gameObject.transform.localScale = new Vector3(minScale,minScale,minScale) * Mathf.Clamp(curScale.x + (Time.deltaTime*scaleSpeed),minScale,maxScale);

                        }
                        else if(isRaisingScale == -1){
                            gameObject.transform.localScale = new Vector3(minScale,minScale,minScale) * Mathf.Clamp(curScale.x - (Time.deltaTime*scaleSpeed),minScale,maxScale);

                        }
                        else{
                            isRaisingScale = 0;
                        }
                    }
                }
                else{
                    isRaisingScale = 0;
                    playedTriggerSound = false;
                    if(snapState == SnapState.SnappedAndUnsnappable)
                    {
                        if(moveData.ValueT == 0 && psMoveWraper.isHandleActive[index] == false){
                            snapState = SnapState.UnsnappedAndUnsnappable;
                            enablePlayer();

                        }
                    }

                }

                // Update border particles
                if (!isTriggerDown && GetComponent<ParticleManager>().IsPlaying())
                    GetComponent<ParticleManager>().Stop();

            }
        }

        if( ((Input.GetKey(KeyCode.Keypad1) == true || Input.GetKey(KeyCode.Alpha1) == true) && index == 0) || ((Input.GetKey(KeyCode.Keypad2) == true || Input.GetKey(KeyCode.Alpha2) == true) && index == 1) || ((Input.GetKey(KeyCode.Keypad3) == true || Input.GetKey(KeyCode.Alpha3) == true) && index == 2)){
            checkKeyboardControls();

        }
    }
        public void LoadData()
        {
            GameObject[] layers, boundings;
            string       serializedMenus;

            string[]          stringMenus;
            EditorObjectsMenu obj;
            Layer             newLayer;
            Vector2           eleGridPos;
            GameObject        child;

            if (selectedObjects == null)
            {
                selectedObjects = new List <EditorObject>();
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-GridSize"))
            {
                gridSize = EditorPrefs.GetInt(PlayerSettings.productName + "-GridSize");
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-ShowGrid"))
            {
                showGrid = EditorPrefs.GetBool(PlayerSettings.productName + "-ShowGrid");
            }

            //Deserialize layers
            layers = GameObject.FindGameObjectsWithTag(Layer.LAYER_TAG);
            //if (this.layers == null)
            this.layers = new List <Layer>();

            foreach (GameObject l in layers)
            {
                newLayer = new Layer(l.name, l);
                for (int i = 0; i < l.transform.childCount; i++)
                {
                    child      = l.transform.GetChild(i).gameObject;
                    eleGridPos = Helper.ConvertVectorToGrid(new Vector2(child.transform.position.x, -child.transform.position.y), gridSize / 100f, gridSize / 100f);
                    newLayer.AddSceneElement(new EditorObject(child, (int)eleGridPos.x, (int)eleGridPos.y, newLayer));
                }

                this.layers.Add(newLayer);
            }

            //Deserialize menus
            if (EditorPrefs.HasKey(PlayerSettings.productName + "-Menus"))
            {
                //if (menus == null)
                menus = new List <EditorObjectsMenu>();

                serializedMenus = EditorPrefs.GetString(PlayerSettings.productName + "-Menus");
                stringMenus     = serializedMenus.Split(';');
                foreach (string s in stringMenus)
                {
                    if (s != "")
                    {
                        obj = new EditorObjectsMenu();
                        obj.Deserialize(s);
                        obj.LoadPrefabs();
                        menus.Add(obj);
                    }
                }
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-CursorColor"))
            {
                cursorColor = FromStringToColor(EditorPrefs.GetString(PlayerSettings.productName + "-CursorColor"));
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-GridColor"))
            {
                gridColor = FromStringToColor(EditorPrefs.GetString(PlayerSettings.productName + "-GridColor"));
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-SelectColor"))
            {
                selectColor = FromStringToColor(EditorPrefs.GetString(PlayerSettings.productName + "-SelectColor"));
            }

            if (EditorPrefs.HasKey(PlayerSettings.productName + "-SnapState"))
            {
                snapState = (SnapState)System.Enum.Parse(typeof(SnapState), EditorPrefs.GetString(PlayerSettings.productName + "-SnapState"));
            }

            LoadInitialIcons();

            //Boundings
            //boundings = GameObject.Find(TILE_BOUNDING_CONTAINER_NAME);
            //foreach (GameObject o in boundings)
            //  o.GetComponent<TileBounding>().LinkAssociatedObjects();

            loaded = true;
        }
Exemplo n.º 19
0
 public SnapStateMachine()
 {
     eState       = SnapState.NoSnap;
     startPending = 0;
 }