Exemple #1
0
    private EntityInfo SetupInfoFor(InfoAnchor anchor, TileableBase source)
    {
        var instance = infoPool.CastSingle <EntityInfo>();

        instance.RectTransform.SetParent(infoParent);
        instance.AssignTo(anchor, source);

        return(instance);
    }
Exemple #2
0
    public void AssignTo(InfoAnchor anchor, TileableBase source)
    {
        isActive = true;

        anchor.onDestroyed += OnAnchorDestroyed;
        this.anchor         = anchor;
        Place();

        this.source = source;
        Refresh();
    }
Exemple #3
0
    void OnHoverStart(InfoAnchor anchor, TileableBase source)
    {
        if (hasHoverInfo)
        {
            return;
        }

        var check = spellInfos.Exists(info => info.Tile == source.Navigator.Current);

        if (check)
        {
            return;
        }

        hasHoverInfo = true;
        hoverInfo    = SetupInfoFor(anchor, source);
    }