public void Play(DamageCutInType iType, Action onStart, Action onFinished) { if (!isPlaying) { _iType = iType; panel.widgetsAreStatic = false; base.transform.localScale = Vector3.one; BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; cutInEffectCamera.motionBlur.enabled = true; cutInEffectCamera.motionBlur.blurAmount = 0.3f; cutInEffectCamera.glowEffect.enabled = false; cutInEffectCamera.isCulling = true; _traShips.localPositionZero(); DamageCutInList damageCutInList = (_iType != 0) ? DamageCutInList.ProdDamageCutInHeavyFirst : DamageCutInList.ProdDamageCutInModerateFirst; if (_iType == DamageCutInType.Moderate) { ((Component)_psModerateSmoke).SetActive(isActive: true); _psModerateSmoke.Play(); } else { ((Component)_psHeavyBack).SetActive(isActive: true); _psHeavyBack.Play(); } Dlg.Call(ref onStart); base.Play(damageCutInList, onFinished); } }
private void onFirstAnimationFinished() { BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; cutInEffectCamera.motionBlur.enabled = false; int num = 0; foreach (DamageShip listDamageShip in _listDamageShips) { listDamageShip.transform.localPosition = BattleDefines.DAMAGE_CUT_IN_SHIP_DRAW_POS[_nDrawShipNum][num]; listDamageShip.transform.localScale = Vector3.one; listDamageShip.shipTexture.alpha = 1f; num++; } _traShips.transform.localScale = Vector3.one * 7.5f; _traShips.transform.localPosition = Vector3.down * 70f; if (_clsShipModel != null) { KCV.Battle.Utils.ShipUtils.PlayDamageCutInVoice(_clsShipModel); } DamageCutInList damageCutInList = (_iType == DamageCutInType.Moderate) ? DamageCutInList.ProdDamageCutInModerateSecond : DamageCutInList.ProdDamageCutInHeavySecond; _animAnimation.Play(damageCutInList.ToString()); }