| | |
| | | towerVSRenderer.enabled = false; |
| | | } |
| | | |
| | | private GameObject buyMesh; |
| | | public GameObject BuyMesh |
| | | { |
| | | get |
| | | { |
| | | return buyMesh; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据传入的参数来设置当前Grid对应的显示信息 |
| | |
| | | switch (newtype) |
| | | { |
| | | case PlacementGridType.EGridWaitBuy: |
| | | GameObject prefab = Resources.Load<GameObject>("Prefabs/BuyMesh"); |
| | | buyMesh = Instantiate(prefab, transform); |
| | | //Debug.Log("未开启塔位" + buyMesh); |
| | | |
| | | if (tileRenderer != null && waitBuyMat != null) |
| | | tileRenderer.sharedMaterial = waitBuyMat; |
| | | break; |
| | |
| | | } |
| | | |
| | | SetWarning(false); |
| | | |
| | | if (buyMesh != null) |
| | | { |
| | | Destroy(buyMesh); |
| | | } |
| | | break; |
| | | case PlacementGridType.EGridDestroyed: |
| | | if (tileRenderer != null && destroyedMat != null) |