You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
858 B
28 lines
858 B
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using Unity.Collections.LowLevel.Unsafe;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.U2D;
|
|
|
|
/// <summary>
|
|
/// Grid version of view container, which does feature an info panel!
|
|
/// </summary>
|
|
public class ViewItemContainerGrid : ViewItemContainer
|
|
{
|
|
public override bool IsSelected {
|
|
get => highLight.gameObject.activeSelf;
|
|
set { infoPanel.gameObject.SetActive(value); highLight.SetActive(value);}
|
|
}
|
|
|
|
//Link to the infomation panel (set in prefab), prototype pattern
|
|
[SerializeField]
|
|
private ViewItemInfoPanel infoPanel;
|
|
|
|
protected override void OnInitialize(Item item,ShopModel owner = null)
|
|
{
|
|
infoPanel.SetItemInfo(item, owner); // Grid info comes with a panel, so we set its info just once
|
|
}
|
|
}
|
|
|