Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / tileSetEditorCombination / right / TileCell.cs
@小李xl 小李xl on 19 Dec 2023 835 bytes 组合图块, 更新纹理, 开发中
using Godot;

namespace UI.TileSetEditorCombination;

public class TileCell : UiCell<TileSetEditorCombination.CellButton, ImportCombinationData>
{
    public override void OnInit()
    {
        CellNode.L_SelectTexture.Instance.Visible = false;
    }
    
    public override void OnSetData(ImportCombinationData data)
    {
        CellNode.L_CellName.Instance.Text = data.Name;
        CellNode.L_PreviewImage.Instance.Texture = data.PreviewTexture;
    }

    public override void OnDoubleClick()
    {
        //双击移除Cell数据
        //EventManager.EmitEvent(EventEnum.OnRemoveTileCell, Data);
    }

    public override void OnSelect()
    {
        CellNode.L_SelectTexture.Instance.Visible = true;
    }

    public override void OnUnSelect()
    {
        CellNode.L_SelectTexture.Instance.Visible = false;
    }
}