我说次元斩
This commit is contained in:
@@ -5,6 +5,7 @@ using DamageNumbersPro;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Cielonos.MainGame
|
||||
{
|
||||
@@ -34,7 +35,12 @@ namespace Cielonos.MainGame
|
||||
if (hitVFXPrefab != null)
|
||||
{
|
||||
direction = direction != default ? direction : Vector3.up;
|
||||
GameObject hitEffect = VFXObject.Spawn(hitVFXPrefab, creator, position, Quaternion.LookRotation(direction));
|
||||
Quaternion rotation = Quaternion.LookRotation(direction);
|
||||
if (attackUnit.randomizeVfxRotation)
|
||||
{
|
||||
rotation *= Quaternion.Euler(Random.Range(0f, 360f), Random.Range(0f, 360f), 0);
|
||||
}
|
||||
GameObject hitEffect = VFXObject.Spawn(hitVFXPrefab, creator, position, rotation);
|
||||
return hitEffect;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user