コード例 #1
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];
                    }
                }
            }
        }
コード例 #2
0
        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];
					}
				}
			}
		}