// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) { rudder.SteerLeft(); } else if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) { rudder.SteerRight(); } else if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow)) { // sails up sails.SpreadSails(); } else if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) { // sails down sails.ReefSails(); } else if (Input.GetKeyDown(KeyCode.Space)) { // fire! if (weapons != null) { weapons.FireCannons(); } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.RightControl)) { // fire! if (weapons != null) { weapons.FireCannons(); } } }