Beispiel #1
0
        private void clickGoToPos(UIComponent component, UIMouseEventParameter eventParam)
        {
            string[] vectorElms = _goToField.text.Split(',');
            if (vectorElms.Length < 2)
            {
                return;
            }

            CameraCtrl.GoToPos(new Vector3(float.Parse(vectorElms[0]), Camera.main.transform.position.y, float.Parse(vectorElms[1])));
        }
        private void clickGoToPos(UIComponent component, UIMouseEventParameter eventParam)
        {
            string[] vectorElms = _goToField.text.Split(',');
            if (vectorElms.Length < 2)
            {
                return;
            }

            ushort segmentId = Convert.ToUInt16(_goToField.text);

            if ((Singleton <NetManager> .instance.m_segments.m_buffer[segmentId].m_flags & NetSegment.Flags.Created) != NetSegment.Flags.None)
            {
                CameraCtrl.GoToPos(new Vector3(float.Parse(vectorElms[0]), Camera.main.transform.position.y, float.Parse(vectorElms[1])));
            }
        }