private void CrewControls() { //Debug.LogError ("ctrl!"); if (!isOccupied) { Vector3 _vect = new Vector3(Input.GetAxis(controllerID + "-H"), 0); rb.MovePosition(transform.position + _vect * speed * Time.deltaTime); /* * if (elevatorIsNear) { * if (Input.GetButtonDown (controllerID + "-s")) { * DoElevatorMenu (); * } * } else { */ if (Input.GetButtonDown(controllerID + "-s")) { //power system TileScript _tile = LevelManager.Instance.Tiles [crewPos]; if (_tile.HasElevator) { DoElevatorMenu(); } else if (!_tile.SystemPlacable) { if (_tile.SysIsPowered && _tile.HasSubSys) { //use terminal //Debug.LogError ("im afraid i cant let you do that dave..."); terminalScr = _tile.GetTerminal(); if (!terminalScr.IsUsed) { isOccupied = true; usingTerminal = true; terminalScr.UseTerminal(this); targetingCursor.gameObject.SetActive(true); } } else { //ISystem _iSys = _tile.GetSystem (); SystemScript _sysScr = _tile.GetSystem(); //currently just switches //the bool ain't needed _sysScr.SyncPowerUpdate(true); //_sysScr.ReceivePowerUpdate (true); //let's network that! //in iSys } } } //} if (Input.GetButtonDown(controllerID + "-a")) { //DoSomeDamage (10); CmdSyncLoops(true, 10); } else if (Input.GetButtonDown(controllerID + "-t")) { //DoSomeDamage (-10); CmdSyncLoops(true, -10); } //swap target //TARGET if (Input.GetButtonDown(controllerID + "-l1")) { //check for crew in room SwitchCrewTarget(-1); Debug.LogError("-l1"); } else if (Input.GetButtonDown(controllerID + "-r1")) { //terminalScr.SwapTargetedShip(1); SwitchCrewTarget(+1); Debug.LogError("-r1"); } if (Input.GetButtonDown(controllerID + "-r2")) { targetHScr.TakeCrewDamage(dmg); Debug.LogError("-r2"); } //exits terminal } else if (usingTerminal) { //stop using target if (Input.GetButtonDown(controllerID + "-c")) { StopUsingTerminal(); } //swap weapons //temp? if (Input.GetButtonDown(controllerID + "-a")) { terminalScr.SwapWeapon(1); } else if (Input.GetButtonDown(controllerID + "-t")) { terminalScr.SwapWeapon(-1); } //swap ships if (Input.GetButtonDown(controllerID + "-l1")) { terminalScr.SwapTargetedShip(-1); } else if (Input.GetButtonDown(controllerID + "-r1")) { terminalScr.SwapTargetedShip(1); } //power weapon up/down if (Input.GetButtonDown(controllerID + "-s")) { //bool doesn't matter currently... //if (isWeaponTerminal) { check is performed within terminal; } terminalScr.TryPowerWeapon(true); } //switch ship cameras } else if (!usingElevator) { if (Input.GetButtonDown(controllerID + "-c")) { //StopSomeDamage (); CmdSyncLoops(false, 0); } } }