123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class ModelMinMap : MonoBehaviour
- {
- // Start is called before the first frame update
- public Vector3 modelMapScale;//获取模型地图的 比例
-
- private float offsetX;
- private float offsetZ;
-
- private void Start()
- {
- modelMapScale = this.transform.localScale;
- offsetX = this.transform.position.x;
- offsetZ = this.transform.position.z;
- }
- //public void AddPlayerTypeOfWorkMapArrow(string arrowPos)
- //{
- // GameObject arrow = Instantiate(cellPrefab) as GameObject;
- // playerTypeOfWorkPos = StrSubstringToV3(arrowPos);
- // arrow.transform.position = playerTypeOfWorkPos;
- // arrow.transform.parent = this.transform.parent.transform;
- //}
- //public void UpdatePlayerTypeOfWorkMapArrowTrasn(Vector3 pos)
- //{
- // float MyX = (1000 / modelMapScale.x) * 2;//比例尺
- // float MyZ = (1000 / modelMapScale.z) * 2;//比例尺
- // if (arrow != null)
- // arrow.transform.localPosition = new Vector3(pos.x / MyX, 0.01f, pos.z / MyZ);
- //}
- // Update is called once per frame
-
- }
|