void Awake() { #region unchanged initialisation //initialise scripts shelfInteraction = gameObject.GetComponent <ShelfInteraction>(); ingredientInteraction = gameObject.GetComponent <IngredientInteraction>(); tableInteraction = gameObject.GetComponent <TableInteraction>(); washInteraction = gameObject.GetComponent <WashInteraction>(); #endregion customerInteraction = gameObject.GetComponent <PlayerCustomerInteractionManager>(); playerState = PlayerState.Default; }
public override void Interact(GameObject originator, Vector3 position, string hand) { Vector3Int pos = objectLayer.transform.InverseTransformPoint(position).RoundToInt(); pos.z = 0; LayerTile tile = metaTileMap.GetTile(pos); if (tile?.TileType == TileType.Table) { TableInteraction interaction = new TableInteraction(gameObject, originator, position, hand); interaction.Interact(isServer); } }
public PublishersPageViewModel() { Publishers = new ObservableCollection <Publisher>(); _tableInteraction = new TableInteraction <Publisher>("publishers", new[] { new Column("id", true, true), new Column("name"), new Column("address"), }); _tableInteraction.InitializeToTable(Publishers); DataGridAddingNewItemCommand = new DelegateCommand <AddingNewItemEventArgs>(DataGridAddingNewItem); DataGridRowEditEndingCommand = new DelegateCommand <DataGridRowEditEndingEventArgs>(DataGridRowEditEnding); PreviewKeyDownCommand = new DelegateCommand <object>(PreviewKeyDown); var semaphore = new Semaphore(0, 1, "PublishersInitialion"); semaphore.WaitOne(); PublishersInitialized?.Invoke(Publishers); semaphore.Dispose(); }