// TODO Something is wrong // Not using now public Dish ThrowAwayDish() { if (dishes.Count == 0) { return(null); } foreach (var t in dishes) { var t1 = handSocket.Remove(); t1.position = trans.position + trans.forward * .5f + Vector3.up; var t2 = t1.gameObject.AddComponent <Rigidbody> (); t2.AddForce(trans.forward * throwForce); } var tt = dishes[dishes.Count - 1]; dishes.RemoveAt(dishes.Count - 1); return(tt); }
public Dish TakeDish() { if (dishes.Count == 0) { return(null); } Dish t = dishes [dishes.Count - 1]; dishes.RemoveAt(dishes.Count - 1); dishSocket.Remove(); t.transform.SetParent(null); return(t); }