public void Pickup() { if (mWasPicked) { Debug.Log("New focus item is set!"); s_CurrentPickup = this; Events.instance.Raise(new SelectPickupEvent(this)); } else if (TableSpot.HasRoomOnTable() && mWasPicked == false && PlayerController.s_PlayerController.GetView() == PickedBy) { mWasPicked = true; transform.position = TableSpot.GetTableSpot(); Debug.Log("Picked!"); SpriteRenderer[] sprites = GetComponentsInChildren <SpriteRenderer>(); foreach (SpriteRenderer sprite in sprites) { sprite.enabled = true; } if (mHighlightObjectInstance) { mHighlightObjectInstance.SetActive(false); } } }
public void AssignSpot(TableSpot _newSpot) { if (_newSpot != null) { _spot = _newSpot; _spot.SpotTaken(this); _agent.destination = Util.SetYToMyY(_newSpot.CustomerDestination, transform.position); } else { RemoveSelf(); } }
public static void RegisterSpot(TableSpot _spot) { t._tableSpots.Add(_spot); }