diff --git a/Assets/Scipts/Map.cs b/Assets/Scipts/Map.cs index ff4667c..25214b2 100644 --- a/Assets/Scipts/Map.cs +++ b/Assets/Scipts/Map.cs @@ -80,7 +80,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -91,7 +91,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -103,7 +103,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -114,7 +114,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -125,7 +125,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -137,7 +137,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -149,7 +149,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } @@ -161,7 +161,7 @@ public class Map : MonoBehaviour GameObject MirrorTile = Instantiate(Tile); MirrorTile.transform.position = newPos; - MirrorTile.transform.Rotate(Vector3.up, RandomRotation); + MirrorTile.transform.rotation = Tile.transform.rotation; MirrorTile.name = Tile.name + "(Mirror)"; } } @@ -176,7 +176,7 @@ public class Map : MonoBehaviour if (Landmarks.Count > 0) { int rand = Random.Range(0, Landmarks.Count); - Instantiate(Landmarks[rand], LP.transform.position, Quaternion.identity, tile.transform); + Instantiate(Landmarks[rand], LP.transform.position, Landmarks[rand].transform.rotation, tile.transform); Landmarks.Remove(Landmarks[rand]); } } diff --git a/Assets/Scipts/PlayerControllers/LocalPlayer.cs b/Assets/Scipts/PlayerControllers/LocalPlayer.cs index 9844566..fac7749 100644 --- a/Assets/Scipts/PlayerControllers/LocalPlayer.cs +++ b/Assets/Scipts/PlayerControllers/LocalPlayer.cs @@ -91,4 +91,13 @@ public class LocalPlayer : Player { recipe.friendlyPickup(vegIn.Name, 1); recipe.pickupItem(vegIn); } + + + public void OnControllerColliderHit(ControllerColliderHit hit) + { + if (hit.gameObject.tag == "Vegetable") + { + PickupVeggie(hit.gameObject.GetComponent().thisVeg); + } + } } diff --git a/Assets/Scipts/VegetableSpawner.cs b/Assets/Scipts/VegetableSpawner.cs index 5a7c87a..c50395e 100644 --- a/Assets/Scipts/VegetableSpawner.cs +++ b/Assets/Scipts/VegetableSpawner.cs @@ -9,6 +9,7 @@ public class VegetableSpawner : MonoBehaviour { { if (other.gameObject.tag == "Player") { + Debug.Log("BUMP"); other.gameObject.GetComponent().PickupVeggie(thisVeg); } } diff --git a/Assets/Shaders.meta b/Assets/Shaders.meta deleted file mode 100644 index 472bf46..0000000 --- a/Assets/Shaders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f87a054963b01dc4c8aa2e3ffedcca21 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VeggieSpots/Mushroom spot.prefab b/Assets/VeggieSpots/Mushroom spot.prefab index 6f5d34c..9c5da71 100644 --- a/Assets/VeggieSpots/Mushroom spot.prefab +++ b/Assets/VeggieSpots/Mushroom spot.prefab @@ -26,7 +26,7 @@ GameObject: - component: {fileID: 54268202253157094} m_Layer: 0 m_Name: Mushroom spot - m_TagString: Untagged + m_TagString: Vegetable m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -38,8 +38,8 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1920492649654550} m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -50.12228, y: 1658.2845, z: -2998.564} - m_LocalScale: {x: 2.9190772, y: 2.9190772, z: 2.9190772} + m_LocalPosition: {x: 92.727745, y: 14.364, z: 115.79399} + m_LocalScale: {x: 1.5848039, y: 1.5848039, z: 1.5848039} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -127,4 +127,4 @@ MonoBehaviour: m_EditorClassIdentifier: thisVeg: Name: Mushroom - Image: {fileID: 0} + Image: {fileID: 21300000, guid: fcda3393a8f19cd45947860ea3beabac, type: 3} diff --git a/Assets/VeggieSpots/carrot_02.prefab b/Assets/VeggieSpots/carrot_02.prefab index 7278a42..ed8c4aa 100644 --- a/Assets/VeggieSpots/carrot_02.prefab +++ b/Assets/VeggieSpots/carrot_02.prefab @@ -41,7 +41,7 @@ GameObject: - component: {fileID: 54734235210677366} m_Layer: 0 m_Name: carrot_02 - m_TagString: Untagged + m_TagString: Vegetable m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/VeggieSpots/potato_01.prefab b/Assets/VeggieSpots/potato_01.prefab index 3813e4f..9df0927 100644 --- a/Assets/VeggieSpots/potato_01.prefab +++ b/Assets/VeggieSpots/potato_01.prefab @@ -26,7 +26,7 @@ GameObject: - component: {fileID: 54371359018975834} m_Layer: 0 m_Name: potato_01 - m_TagString: Untagged + m_TagString: Vegetable m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/VeggieSpots/pumpkin.prefab b/Assets/VeggieSpots/pumpkin.prefab index 0fa7212..f9bc5de 100644 --- a/Assets/VeggieSpots/pumpkin.prefab +++ b/Assets/VeggieSpots/pumpkin.prefab @@ -26,7 +26,7 @@ GameObject: - component: {fileID: 54050288613722914} m_Layer: 0 m_Name: pumpkin - m_TagString: Untagged + m_TagString: Vegetable m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/WorldAssets/Models.meta b/Assets/WorldAssets/Models.meta deleted file mode 100644 index a4d7756..0000000 --- a/Assets/WorldAssets/Models.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c207356b78ec8e8499bb6047218dd104 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 789af98..353968f 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82a52046af97890d54c8ecc9775a20133efaea10fed6aeeb250dfac8edf2a1e2 -size 442 +oid sha256:bb1e2bd74e8f7a5986d294e2a241f1ee2af6ed814479b1bc5b0de65da05861c7 +size 453