| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using Core.Utilities; |
| | | using DG.Tweening; |
| | | using MoreMountains.NiceVibrations; |
| | | |
| | | /** |
| | | * 无尽模式玩家基地血量管理器 |
| | |
| | | /// <summary> |
| | | /// 爱心列表 |
| | | /// </summary> |
| | | public List<Image> HeartList; |
| | | public List<GameObject> HeartList; |
| | | |
| | | // Start is called before the first frame update |
| | | private void Start() |
| | |
| | | |
| | | while (i < end) |
| | | { |
| | | Color c = HeartList[i].color; |
| | | c.a = 0.27f; |
| | | HeartList[i].color = c; |
| | | Image img = HeartList[i].GetComponent<Image>(); |
| | | Color c = img.color; |
| | | c.a = 0.17f; |
| | | img.color = c; |
| | | |
| | | GameObject psObj = HeartList[i].transform.GetChild(0).gameObject; |
| | | ParticleSystem ps = psObj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | ps.Play(); |
| | | ++i; |
| | | } |
| | | |
| | | ViewPortAdj.instance.cachedCamera.DOShakePosition(0.25f, 1.5f, 4); |
| | | MMVibrationManager.Haptic(HapticTypes.HeavyImpact); |
| | | |
| | | if (CurrentHP == 0) |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessHeartAllLose); |
| | | } |