Example #1
0
    // Create a new shovel icon.
    public ShovelIcon CreateShovelIcon()
    {
        ShovelIcon shovelIcon = Instantiate <ShovelIcon>(_shovelIconPrefab);

        shovelIcon.transform.SetParent(_canvasRoot, false);

        return(shovelIcon);
    }
Example #2
0
 public void SetShovelIcon(ShovelIcon icon)
 {
     _shovelIcon = icon;
     _shovelIcon.SetAttachPoint(_iconAttachPoint);
     _shovelIcon.SetText(_shovelData.Name);
 }