void PickUpIngredient(Transform ingredientTransform) { physIngr = ingredientTransform.GetComponent <PhysicalIngredient>(); physIngr.GetComponent <BoxCollider2D>().enabled = false; physIngr.transform.SetParent(transform); physIngr.transform.localPosition = new Vector2(0, .16f); }
void DropIngredient() { physIngr.transform.SetParent(null); physIngr.transform.position = new Vector2(transform.position.x + fowardVector.x, transform.position.y + fowardVector.y); physIngr.GetComponent<BoxCollider2D>().enabled = true; physIngr.Dropped(); physIngr = null; }
void DropIngredient() { physIngr.transform.SetParent(null); physIngr.transform.position = new Vector2(transform.position.x + fowardVector.x, transform.position.y + fowardVector.y); physIngr.GetComponent <BoxCollider2D>().enabled = true; physIngr.Dropped(); physIngr = null; }
void PickUpIngredient(Transform ingredientTransform) { physIngr = ingredientTransform.GetComponent<PhysicalIngredient>(); physIngr.GetComponent<BoxCollider2D>().enabled = false; physIngr.transform.SetParent(transform); physIngr.transform.localPosition = new Vector2(0, .16f); }