Ejemplo n.º 1
0
 void PickUpIngredient(Transform ingredientTransform)
 {
     physIngr = ingredientTransform.GetComponent <PhysicalIngredient>();
     physIngr.GetComponent <BoxCollider2D>().enabled = false;
     physIngr.transform.SetParent(transform);
     physIngr.transform.localPosition = new Vector2(0, .16f);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 void PickUpIngredient(Transform ingredientTransform)
 {
     physIngr = ingredientTransform.GetComponent<PhysicalIngredient>();
     physIngr.GetComponent<BoxCollider2D>().enabled = false;
     physIngr.transform.SetParent(transform);
     physIngr.transform.localPosition = new Vector2(0, .16f);
 }