コード例 #1
0
    public void OnOccupantSet(Node n)
    {
        GD.Print(Name, "  is setting occupant: ", n?.Name);
        (OccupantObserver as Node)?.QueueFree();
        OccupantObserver = null;

        if (n != null)
        {
            OccupantObserver = (DefaultInvPV)EasyInstancer.GenObserver(n, ((IHasInvPV)n).ObserverPathInvPV);
            AddChild((Node)OccupantObserver);
            OccupantObserver.parent = this;
            RecomputeOccupantPos();
        }
    }
コード例 #2
0
 //Purely a way for InventoryMenu to interact with provider Accept function
 public bool AcceptItem(DefaultInvPV item)
 {
     return(provider.AcceptItem(item.Provider));
 }