示例#1
0
		private static bool CheckScope(Control c) {
			switch(c.scope) {
				case Scope.ReleaseOnly:
					return Application.isEditor == false;
				case Scope.EditorOnly:
					return Application.isEditor;
				default:
					return true;
			}
		}
示例#2
0
		private static void UpdateControl(Control c) {
			if(CheckScope(c)) {
				c.Update();

				//if((c.down & ControlState.Either) != 0)
				//	anyControlDown = true;
				//if((c.held & ControlState.Either) != 0)
				//	anyControlHeld = true;
				//if((c.up & ControlState.Either) != 0)
				//	anyControlUp = true;
			}
		}
示例#3
0
        public SimpleDataView(Control c)
        {
            this.identifier = c.identifier;

            if(c is ActionControl) {
                var ac = c as ActionControl;
                this.bindings = ac.bindings.Select(b => b.Key).ToArray();
                this.modifiers = ac.bindings.Values.ToArray();
            }
            else if(c is AxisControl) {
                var ax = c as AxisControl;
                this.bindings = ax.bindings.Select(b => b.Key).ToArray();
            }
        }