minor update.

This commit is contained in:
kidagine
2021-11-03 08:26:03 +01:00
parent 79b1f44aea
commit 987ee5d6f9
4 changed files with 28 additions and 0 deletions

View File

@@ -1355,6 +1355,13 @@ AnimationClip:
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events:
- time: 0
functionName: StartFrameCount
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.16666667
functionName: CreateEffectAnimationEvent
data:
@@ -1362,6 +1369,13 @@ AnimationClip:
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.16666667
functionName: StopFrameCount
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.38333333
functionName: UnlockMovement
data:

View File

@@ -9,6 +9,7 @@ public class Hurtbox : MonoBehaviour
public Color HurtboxColor { get; private set; } = Color.green;
void Awake()
{
_hurtboxResponder = _hurtboxResponderObject.GetComponent<IHurtboxResponder>();

View File

@@ -50,6 +50,8 @@ public class GameManager : MonoBehaviour
void Awake()
{
Application.targetFrameRate = 60;
QualitySettings.vSyncCount = 1;
CheckInstance();
CheckSceneSettings();
if (!_sceneSettingsDecide)

View File

@@ -6,6 +6,7 @@ public class PlayerAnimationEvents : MonoBehaviour
[SerializeField] private Player _player = default;
[SerializeField] private PlayerMovement _playerMovement = default;
[SerializeField] private Audio _audio = default;
private float _startFrames;
public void UnlockMovement()
{
@@ -43,4 +44,14 @@ public class PlayerAnimationEvents : MonoBehaviour
{
_audio.Sound(soundName).Play();
}
public void StartFrameCount()
{
_startFrames = Time.frameCount;
}
public void StopFrameCount()
{
Debug.Log(Time.frameCount - _startFrames);
}
}