Exemplo n.º 1
0
    public void SetTileEntity(TileEntitySecureLootContainer tileEntity)
    {
        _tileEntity = tileEntity;
        var chunk           = tileEntity.GetChunk();
        var blockEntityData = chunk != null?chunk.GetBlockEntity(tileEntity.ToWorldPos()) : null;

        _blockEntityData = blockEntityData;
        _textMeshes      = _blockEntityData.transform.GetComponentsInChildren <TextMesh>();
    }
Exemplo n.º 2
0
    public override void OnClose()
    {
        _tileEntity.SetModified();
        _tileEntity.SetUserAccessing(false);
        GameManager.Instance.TEUnlockServer(_tileEntity.GetChunk().ClrIdx, _tileEntity.ToWorldPos(), _tileEntity.entityId);
        base.OnClose();
        xui.playerUI.entityPlayer.PlayOneShot("close_sign");

        if (!string.IsNullOrEmpty(textInput.Text))
        {
            SetText(textInput.Text, true);
        }
        else
        {
            SetText("Storage", true);
        }
    }