summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/TextLink.cs
blob: 6ad9e25858fc8ea2dce884512eef59936e2b4fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using UnityEngine;

public class TextLink : MonoBehaviour
{
	public BoxCollider2D boxCollider;

	public string targetUrl;

	public bool needed;

	public void Set(Vector2 from, Vector2 to, string target)
	{
		this.targetUrl = target;
		Vector2 vector = to + from;
		base.transform.localPosition = new Vector3(vector.x / 2f, vector.y / 2f, -1f);
		vector = to - from;
		vector.y = -vector.y;
		this.boxCollider.size = vector;
	}

	public void Click()
	{
		Application.OpenURL(this.targetUrl);
	}
}