void FindPairedButton()

        {
            // find the other button witch which this button should be paired

            // (it should have the same axisName)

            var otherAxisButtons = FindObjectsOfType(typeof(AxisTouchButton)) as AxisTouchButton[];



            if (otherAxisButtons != null)

            {
                for (int i = 0; i < otherAxisButtons.Length; i++)

                {
                    if (otherAxisButtons[i].axisName == axisName && otherAxisButtons[i] != this)

                    {
                        m_PairedWith = otherAxisButtons[i];
                    }
                }
            }
        }
        private void FindPairedButton()
        {
            var otherAxisButtons = FindObjectsOfType(typeof(AxisTouchButton)) as AxisTouchButton[];

            if (otherAxisButtons != null)
            {
                for (int i = 0; i < otherAxisButtons.Length; i++)
                {
                    if (otherAxisButtons[i].axisName == axisName && otherAxisButtons[i] != this)
                    {
                        m_PairedWith = otherAxisButtons[i];
                    }
                }
            }
        }
Пример #3
0
		void FindPairedButton()
		{
			// find the other button witch which this button should be paired
			// (it should have the same axisName)
			var otherAxisButtons = FindObjectsOfType(typeof(AxisTouchButton)) as AxisTouchButton[];

			if (otherAxisButtons != null)
			{
				for (int i = 0; i < otherAxisButtons.Length; i++)
				{
					if (otherAxisButtons[i].axisName == axisName && otherAxisButtons[i] != this)
					{
						m_PairedWith = otherAxisButtons[i];
					}
				}
			}
		}