示例#1
0
    internal void TargetReceiveUpdate(NetworkConnection conn, StoreInventory inventory)
    {
        if (debug)
        {
            Debug.Log("StoreManager Client: We received a single update for store " + storeNumber);
        }
        this.currentStoreInventory.Apply(inventory);

        /* Get the main player */
        PlayerEntityController player = SojournGameManager.GetMainPlayer();

        Debug.Assert(player != null);

        /* Get the bartering menu manager */
        PlayerBarteringManager menu = player.GetComponent <PlayerBarteringManager>();

        /* Let the manager know that the inventory changed. */
        menu.StoreInventoryChanged(this);
    }
示例#2
0
    internal void RpcUpdateClientStoreInventory(StoreInventory currentInventory)
    {
        if (debug)
        {
            Debug.Log("StoreManager Client: We got an update for store " + storeNumber);
        }

        this.currentStoreInventory.Apply(currentInventory);

        /* Get the main player */
        PlayerEntityController player = SojournGameManager.GetMainPlayer();

        Debug.Assert(player != null);

        /* Get the bartering menu manager */
        PlayerBarteringManager menu = player.GetComponent <PlayerBarteringManager>();

        /* Let the manager know that the inventory changed. */
        menu.StoreInventoryChanged(this);
    }