public void SmashGround(bool isSmall) { float range = isSmall? _playerData.SmallSmashRange : _playerData.BigSmashRange; ShakePreset currentShake = isSmall? _smallSmashShake : _bigSmashShake; Shaker.ShakeAll(currentShake); _playerData.ActionController.SmashEffect.transform.position = _playerData.ActionController.Transf.position - Vector3.up * 0.8f; _playerData.ActionController.SmashEffect.SetActive(true); _playerData.ActionController.SmashEffect.GetComponent <Renderer>().sharedMaterial.SetFloat("Timer", -0.44f); Vector3 playerPos = _playerData.ActionController.Transf.position; //check all the enemies in the area foreach (KillEnemy enemy in KillEnemy.EnemiesList) { if ((enemy.transform.position.y > playerPos.y - 1f && enemy.transform.position.y < playerPos.y + 1f) && Vector3.Distance(playerPos, enemy.transform.position) <= range) { RaycastHit hit; if (Physics.Raycast(playerPos, (enemy.transform.position - playerPos).normalized, out hit, Mathf.Infinity) && hit.transform.gameObject == enemy.gameObject) { enemy.GetComponent <Enemy>().OnHit(10); } } } }
private void ShakeCamera(ShakePreset sPreset) { if (sPreset != null) { Shaker.ShakeAll(sPreset); } }
// Token: 0x06007407 RID: 29703 RVA: 0x0037E4F4 File Offset: 0x0037C6F4 public void CPNBIFCHLFK(ShakePreset CNMNNFBKKKD) { this.CPNBIFCHLFK(CNMNNFBKKKD.Duration, CNMNNFBKKKD.Strength, CNMNNFBKKKD.Vibrato, CNMNNFBKKKD.Randomness, (!CNMNNFBKKKD.UseRandomInitialAngle) ? CNMNNFBKKKD.InitialAngle : -1f, CNMNNFBKKKD.Rotation, CNMNNFBKKKD.Smoothness, CNMNNFBKKKD.IgnoreTimeScale); }
public void Shake(ShakePreset preset) { ProCamera2DShake.Instance.Shake(preset); }