diff --git a/Assets/Scripts/Building/BuildingBlueprint.cs b/Assets/Scripts/Building/BuildingBlueprint.cs index bd5a873..60ef8aa 100644 --- a/Assets/Scripts/Building/BuildingBlueprint.cs +++ b/Assets/Scripts/Building/BuildingBlueprint.cs @@ -69,6 +69,7 @@ public abstract class BuildingBlueprint : MonoBehaviour Destroy(this.gameObject); } + //Collinding Callbacks if (isColliding) { WhileColliding(); @@ -77,6 +78,44 @@ public abstract class BuildingBlueprint : MonoBehaviour { WhileNotColliding(); } + + + //Rotate + if (Input.GetButtonDown("Rotate")) + { + Debug.Log("Rotate+"); + if (Input.GetKey(KeyCode.LeftShift)) + { + transform.Rotate(0, 5, 0); + }else if (Input.GetKey(KeyCode.LeftControl)) + { + transform.Rotate(0, 45, 0); + } + else + { + transform.Rotate(0, 22.5f, 0); + } + + } + + if (Input.GetButtonDown("CounterRotate")) + { + Debug.Log("Rotate-"); + if (Input.GetKey(KeyCode.LeftShift)) + { + transform.Rotate(0, -5, 0); + }else if (Input.GetKey(KeyCode.LeftControl)) + { + transform.Rotate(0, -45, 0); + } + else + { + transform.Rotate(0, -22.5f, 0); + } + + } + + } } diff --git a/UserSettings/Search.settings b/UserSettings/Search.settings new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/UserSettings/Search.settings @@ -0,0 +1 @@ +{} \ No newline at end of file