Пример #1
0
        public void OnBuildEnd()
        {
            //finishes the build event in order to prevent exceptions
            Debug.Log("Ended Build");
            OnDrag = false;
            RoundHandler.CheckGold();


            //restores layers and lists for selecteddot and selecteddotbefore
            if (selectedDot != null)
            {
                foreach (Connection c in selectedDot.Connections)
                {
                    c.cube.gameObject.layer = 8;
                }
                selectedDot.UpdateList();
                selectedDot.UpdateRecognition();
            }
            //restores color of selected fragments
            foreach (DotFragment fragment in selectedDotBefore.DotFragments)
            {
                fragment.SelectColor(true);
            }
            foreach (DotFragment fragment in selectedDot.DotFragments)
            {
                fragment.SelectColor(true);
            }
            if (selectedDotBefore != null)
            {
                foreach (Connection c in selectedDotBefore.Connections)
                {
                    c.cube.gameObject.layer = 8;
                }
                selectedDotBefore.UpdateList();
                selectedDotBefore.UpdateRecognition();
            }
            clickRegist = null;
            //Signals to the connections to revert all layers
            foreach (Connection c in FindObjectsOfType <Connection>())
            {
                c.cube.gameObject.layer = 8;
            }
        }
Пример #2
0
 void EndTurn()
 {
     RoundHandler.CheckGold();
     RoundHandler.NextPlayer();
 }