| | |
| | | /// </summary> |
| | | public GameObject TowerAppearEffectPrefab; |
| | | |
| | | public GameObject TowerUpgradeEffectPrefabGuide;//新手导航特效Layer是UI |
| | | public GameObject TowerAppearEffectPrefabGuide;//新手导航特效Layer是UI |
| | | |
| | | |
| | | //首次购买宝石特效 |
| | | public GameObject fireAppearEffect1; |
| | | public GameObject fireAppearEffect2; |
| | |
| | | { |
| | | if (!TryPlaceTower(pointerInfo, false, true)) |
| | | { |
| | | CancelPlaceTower(pointerInfo); |
| | | CancelPlaceTower(pointerInfo); |
| | | |
| | | Debug.Log("这里需要返回原位"); |
| | | return; |
| | |
| | | Destroy(obj, ps.main.duration); |
| | | } |
| | | |
| | | public void PlayAppearEffectGuide(Vector3 worldPos) |
| | | { |
| | | GameObject obj = Instantiate(TowerAppearEffectPrefabGuide); |
| | | obj.transform.position = worldPos; |
| | | |
| | | Vector3 pos = obj.transform.position; |
| | | pos.y += 5f; |
| | | obj.transform.position = pos; |
| | | |
| | | ParticleSystem ps = obj.GetComponent<ParticleSystem>(); |
| | | |
| | | if (ps == null) |
| | | ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | |
| | | ps.Play(); |
| | | |
| | | Destroy(obj, ps.main.duration); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 播放宝石出现特效 |
| | | /// </summary> |
| | |
| | | Destroy(obj, ps.main.duration); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 播放升级特效 |
| | | /// </summary> |
| | | /// <param name="worldPos"></param> |
| | | public void GuidePlayUpgradeEffect(Vector3 position) |
| | | { |
| | | GameObject effect = TowerUpgradeEffectPrefab; |
| | | |
| | | // 在sTower的位置播放升级特效 |
| | | GameObject obj = Instantiate(effect); |
| | | GameObject obj = Instantiate(TowerUpgradeEffectPrefabGuide); |
| | | obj.transform.position = position; |
| | | |
| | | Vector3 pos = obj.transform.position; |
| | | pos.y += 5f; |
| | | obj.transform.position = pos; |
| | |
| | | |
| | | if (ps == null) |
| | | ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | |
| | | ps.Play(); |
| | | Destroy(obj, ps.main.duration); |
| | | } |