This commit is contained in:
CortexCore
2024-03-29 00:58:24 +08:00
parent 967ad8eacf
commit 05315ef4a8
232 changed files with 53368 additions and 8539 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using BITFALL.Entities;
using BITFALL.Player.Movement;
using BITFALL.Props;
using BITKit;
using BITKit.Entities;
using BITKit.Entities.Player;
@@ -19,6 +20,7 @@ namespace BITFALL.Feel
[SerializeField] private UnityEvent _unityEvent;
[SerializeField] private UnityEvent playerDeathEvent;
[SerializeField] private Volume vignettingVolume;
[SerializeField] private Volume playerFlashVolume;
[SerializeField] private AnimationCurve vignettingCurve;
[Inject]
private IKnockdown _knockdown;
@@ -26,13 +28,15 @@ namespace BITFALL.Feel
private IHealth _health;
[Inject]
private IPlayerMovement _playerMovement;
[Inject] private IStunObject _stunObject;
private void Start()
{
playerService.OnPlayerInitialized += OnPlayerInitialized;
playerService.OnPlayerDisposed += OnPlayerDisposed;
vignettingVolume.weight = 0;
playerFlashVolume.weight = 0;
}
private void Update()
@@ -63,6 +67,15 @@ namespace BITFALL.Feel
_knockdown.OnRevive += OnRevive;
_health.OnSetAlive += OnSetAlive;
_stunObject.OnWeightChanged += OnWeightChanged;
playerFlashVolume.weight = 0;
}
private void OnWeightChanged(float obj)
{
playerFlashVolume.weight= obj;
}
private void OnSetAlive(bool obj)