架构大更
This commit is contained in:
@@ -7,20 +7,20 @@ namespace AllIn1VfxToolkit.Demo.Scripts
|
||||
[SerializeField] private float shakeAmount = 0.15f;
|
||||
[SerializeField] private bool doShakeOnStart;
|
||||
[SerializeField] private float shakeOnStartDelay;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if(doShakeOnStart)
|
||||
if (doShakeOnStart)
|
||||
{
|
||||
if(shakeOnStartDelay < Time.deltaTime) DoShake();
|
||||
if (shakeOnStartDelay < Time.deltaTime) DoShake();
|
||||
else Invoke(nameof(DoShake), shakeOnStartDelay);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoShake()
|
||||
{
|
||||
if(AllIn1Shaker.i != null) AllIn1Shaker.i.DoCameraShake(shakeAmount);
|
||||
else Debug.LogError($"No AllIn1Shaker found. Please add one to the scene");
|
||||
if (AllIn1Shaker.i != null) AllIn1Shaker.i.DoCameraShake(shakeAmount);
|
||||
else Debug.LogError("No AllIn1Shaker found. Please add one to the scene");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user