添加音效 v0.1版
This commit is contained in:
@@ -39,6 +39,10 @@ namespace IndianOceanAssets.Engine2_5D
|
||||
if (isPlayer && onPlayerDamaged != null)
|
||||
onPlayerDamaged.Invoke();
|
||||
|
||||
// 播放受伤音效
|
||||
if (isPlayer && AudioManager.Instance != null)
|
||||
AudioManager.Instance.PlaySFXFromResources("SFX/Hurt", 0.7f);
|
||||
|
||||
// If dead
|
||||
if (health <= 0)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using GameFramework;
|
||||
|
||||
namespace IndianOceanAssets.Engine2_5D
|
||||
{
|
||||
@@ -89,6 +90,10 @@ namespace IndianOceanAssets.Engine2_5D
|
||||
isRolling = true;
|
||||
lastRollTime = Time.time;
|
||||
|
||||
// 播放冲刺音效
|
||||
if (AudioManager.Instance != null)
|
||||
AudioManager.Instance.PlaySFXFromResources("SFX/Dash", 0.8f);
|
||||
|
||||
float timer = 0.2f;
|
||||
Vector3 rollDir = new Vector3(inputDirection.x, 0f, inputDirection.y).normalized;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user