summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XSuperRiskMapRenderer.cs
blob: 68c4dc4feb83e5860503a2719cb33b0e2219fde8 (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;

namespace XMainClient
{
	internal class XSuperRiskMapRenderer
	{
		private Vector2 ZeroPos = Vector2.zero;

		private float StepSizeX = 0f;

		private float StepSizeY = 0f;

		public void SetInitInfo(Vector2 _ZeroPos, float stepx, float stepy)
		{
			this.ZeroPos = _ZeroPos;
			this.StepSizeX = stepx;
			this.StepSizeY = stepy;
		}

		public Vector2 CoordToUI(Coordinate coord)
		{
			return this.ZeroPos + new Vector2((float)coord.x * this.StepSizeX, (float)(-(float)coord.y) * this.StepSizeY);
		}
	}
}