void GetInput() { if (arm != null && hasAuthority) { ButtonType t = arm.GetButtonType(); if (t == ButtonType.button && Input.GetKeyDown(inputKey)) { if (arm.CheckInput()) { //arm.PressButton(); CmdCheckInput(); CmdPressButton(0, -1); Debug.Log("Arm is over button"); } } else if (t == ButtonType.lever && Input.GetKey(inputKey)) { if (arm.CheckInput()) { CmdCheckInput(); int num; if ((num = arm.CheckLeverPull()) >= 0) { //arm.PullLever(num); CmdPressButton(1, num); } } } else if (Input.GetKeyUp(inputKey)) { arm.NoInput(); CmdNoInput(); } } }