示例#1
0
    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;
    }
示例#2
0
        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);
            }
        }
示例#3
0
        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();
        }