Example #1
0
        //public InputSelector(KeyCode kc) { new InputSelector() }

        ///// <summary>
        ///// There are a few derived variations of InputSelect in this class, but we only instantiate the one that gets used. Initilize does that.
        ///// </summary>
        //public void Initialize()
        //{
        //	UpdateToSelectedType();
        //	//if (triggers != null)
        //	//inputSelection.Initialize(this);

        //}

        /// <summary>
        /// When an input type category is selected, only that derived class will get used, null the others to
        /// </summary>
        public void UpdateToSelectedType()
        {
            if (inputType == InputType.Axis)
            {
                inputSelection = inputAxis;
            }
            else if (inputType == InputType.KeyCode)
            {
                inputSelection = inputKeyCode;
            }
            else if (inputType == InputType.Keys)
            {
                inputSelection = inputKeys;
            }
            else if (inputType == InputType.UIZone)
            {
                inputSelection = inputUIZone;
            }
            else if (inputType == InputType.TouchArea)
            {
                inputSelection = inputTouchArea;
            }

            //NullUnusedTypes();

            inputSelection.Initialize(this);
        }
Example #2
0
 // Constructors
 public InputSelector(KeyCode kc)
 {
     inputKeyCode         = new InputSelectorKeyCode();
     inputSelection       = inputKeyCode;
     inputType            = InputType.KeyCode;
     inputKeyCode.keyCode = (int)kc;
 }