コード例 #1
0
ファイル: CharacterAction.cs プロジェクト: LLC-IGroup/RPG
    // Public
    // Private
    private void DropCellToHotBar(DragAndDropParam dragAndDropParam)
    {
        HotBarCell hotBarCell = dragAndDropParam.dragCell as HotBarCell;

        hotBarCell.baseCell = dragAndDropParam.dropCell;
        UIBuilder.UpdateAllPanels();
    }
コード例 #2
0
ファイル: PanelHotBarCell.cs プロジェクト: LLC-IGroup/RPG
    override public void Awake()
    {
        base.Awake();
        // Set Param
        HotBarCell hotBarCell = CharacterParam.hotBarInventory.GetHotBarCell(cellCount);

        rootPanel = rootPanelObject.GetComponent <BasePanel>();
        base.SetParam(hotBarCell, rootPanel);
    }
コード例 #3
0
ファイル: PanelHotBarCell.cs プロジェクト: LLC-IGroup/RPG
 // Public
 public void SetParam(HotBarCell hotBarCell, BasePanel rootPanel)
 {
     base.SetParam(baseCell, rootPanel);
     if (hotBarCell.baseCell == null)
     {
         imageInnerIcon.gameObject.SetActive(false);
         return;
     }
     if (hotBarCell.baseCell is ItemCell)
     {
         ItemCell itemCell = hotBarCell.baseCell as ItemCell;
         imageInnerIcon.sprite = Resources.Load <Sprite>("Icons/" + itemCell.item.iconName);
         imageInnerIcon.gameObject.SetActive(true);
     }
     if (hotBarCell.baseCell is SkillCell)
     {
         SkillCell skillCell = hotBarCell.baseCell as SkillCell;
         imageInnerIcon.sprite = Resources.Load <Sprite>("Icons/" + skillCell.skill.iconName);
         imageInnerIcon.gameObject.SetActive(true);
     }
 }
コード例 #4
0
    // Constructor
    public HotBarInventory()
    {
        HotBarCell hotBarCell = null;

        listHotBarCell   = new List <HotBarCell>();
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 0;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 1;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 2;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 3;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 4;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 5;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 6;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 7;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 8;
        listHotBarCell.Add(hotBarCell);
        hotBarCell       = new HotBarCell();
        hotBarCell.count = 9;
        listHotBarCell.Add(hotBarCell);
    }