Ejemplo n.º 1
0
    public void DestroySelf()
    {
        DefenderTile currTile = GetCurrentTile();

        currTile.UpdateValidTileHighlight();
        currTile.RemoveHighlight();
        Destroy(gameObject);
    }
Ejemplo n.º 2
0
    // When clicked, it calls OnMouseDown in the DefenderTile which this gameobject is a grandchild of
    // Workaround to a problem where not all the tile's region registers clicks (because this gameobject's collider is blocking them)
    private void OnMouseDown()
    {
        DefenderTile currTile = container.GetCurrentTile();

        currTile.OnMouseDown();
    }