public static CapturePoint newCapturePoint(Player player, int x, int y) { GameObject CaptureGO = GameObject.Instantiate(Board.Instance.CapturePointPrefab, Board.Instance.transform); CapturePoint capture = CaptureGO.GetComponent <CapturePoint>(); var P1 = player == Player.Player1; capture.Setup(P1, x, y); return(capture); }
public static CapturePoint newCapturePoint(Player player) { GameObject CaptureGO = GameObject.Instantiate(Board.Instance.CapturePointPrefab, Board.Instance.transform); CapturePoint capture = CaptureGO.GetComponent <CapturePoint>(); var P1 = player == Player.Player1; capture.Setup(P1, !P1 ? 1 : Board.Instance.WIDTH - capture.Width - 1, P1 ? 1 : Board.Instance.HEIGHT - capture.Height - 1); return(capture); }