Removed the removal of a cleaner item from players hand when a new object is spawned in

This commit is contained in:
Gregory Campbell
2020-06-07 13:16:58 -04:00
parent 8ca92ec70e
commit 33e79d91c5
+2 -14
View File
@@ -89,7 +89,7 @@ public class GameScript : MonoBehaviour
if(seconds < 0 && !gameOver)
{
Debug.Log(objectsPolished);
//Debug.Log(objectsPolished);
gameOver = true;
clicked = false;
@@ -124,23 +124,11 @@ public class GameScript : MonoBehaviour
void Setup()
{
clicked = false;
Cursor.visible = true;
Object.transform.localScale = new Vector3(1, 1, 1);
Object.GetComponent<SpriteRenderer>().sprite = null;
Destroy(Object.GetComponent<PolygonCollider2D>());
if(pickedUpItem != null && pickedUpItem.name == "Rag")
{
pickedUpItem.transform.position = new Vector2(7.25f, 2.5f);
pickedUpItem.transform.rotation = Quaternion.identity;
} else if (pickedUpItem != null && pickedUpItem.name == "SprayBottle"){
pickedUpItem.transform.position = new Vector2(7.25f, -2.5f);
pickedUpItem.transform.rotation = Quaternion.identity;
}
pickedUpItem = null;
float sizeChange = Random.Range(0.9f, 1.25f);
Object.GetComponent<SpriteRenderer>().sprite =