- Build Manager system to allow swapping, saving and loading build setups for characters - Necromancer new channeled ability: Soulfire - Mage new melee ability: Cold Slash - Mage new summon ability: Mirror Image - Added summon ability support to spawn more than one minion per cast
34 lines
977 B
C#
34 lines
977 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Assets.CaptainCatSparrow.SpellIconsVolume_2.Druid.Demo
|
|
{
|
|
public class Demo : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Sprite[] icons;
|
|
[SerializeField]
|
|
private GameObject iconPrefab;
|
|
private ScrollRect _scroll;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
var canvas = GameObject.Find("Canvas").transform;
|
|
_scroll = canvas.Find("Scroll/Scroll View").GetComponent<ScrollRect>();
|
|
PopulateGrid();
|
|
}
|
|
|
|
private void PopulateGrid()
|
|
{
|
|
foreach (var sprite in icons)
|
|
{
|
|
var icon = Instantiate(iconPrefab);
|
|
icon.transform.Find("Mask/Image").GetComponent<Image>().sprite = sprite;
|
|
icon.transform.SetParent(_scroll.content);
|
|
}
|
|
}
|
|
}
|
|
}
|