parent
bd221908a9
commit
70c2edfd01
@ -1,24 +1,5 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!114 &-1126567206187632849
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 3
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 221518ef91623a7438a71fef23660601, type: 3}
|
|
||||||
m_Name: WhiteBalance
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
active: 0
|
|
||||||
temperature:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: -3.8
|
|
||||||
tint:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 0
|
|
||||||
--- !u!114 &11400000
|
--- !u!114 &11400000
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -32,61 +13,7 @@ MonoBehaviour:
|
|||||||
m_Name: CombatPostProcessingVolume
|
m_Name: CombatPostProcessingVolume
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
components:
|
components:
|
||||||
- {fileID: 8895738348956266320}
|
|
||||||
- {fileID: 6190156615780581590}
|
|
||||||
- {fileID: 8563356217564074714}
|
- {fileID: 8563356217564074714}
|
||||||
- {fileID: 3032653963992883521}
|
|
||||||
- {fileID: -1126567206187632849}
|
|
||||||
--- !u!114 &3032653963992883521
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 3
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 558a8e2b6826cf840aae193990ba9f2e, type: 3}
|
|
||||||
m_Name: ShadowsMidtonesHighlights
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
active: 0
|
|
||||||
shadows:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: {x: 0.99049765, y: 0.8950539, z: 1, w: 0}
|
|
||||||
midtones:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: {x: 0.84888226, y: 0.5722743, z: 1, w: 0}
|
|
||||||
highlights:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: {x: 0.48475826, y: 1, z: 0.92944735, w: 0}
|
|
||||||
shadowsStart:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 0
|
|
||||||
shadowsEnd:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 0.3
|
|
||||||
highlightsStart:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 0.55
|
|
||||||
highlightsEnd:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 1
|
|
||||||
--- !u!114 &6190156615780581590
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 3
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 81180773991d8724ab7f2d216912b564, type: 3}
|
|
||||||
m_Name: ChromaticAberration
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
active: 0
|
|
||||||
intensity:
|
|
||||||
m_OverrideState: 1
|
|
||||||
m_Value: 1
|
|
||||||
--- !u!114 &8563356217564074714
|
--- !u!114 &8563356217564074714
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
@ -102,63 +29,16 @@ MonoBehaviour:
|
|||||||
active: 0
|
active: 0
|
||||||
color:
|
color:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: {r: 0, g: 1, b: 1, a: 1}
|
m_Value: {r: 1, g: 0, b: 0, a: 1}
|
||||||
center:
|
center:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: {x: 0.5, y: 0.5}
|
m_Value: {x: 0.5, y: 0.5}
|
||||||
intensity:
|
intensity:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0.294
|
m_Value: 0.2
|
||||||
smoothness:
|
smoothness:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 1
|
m_Value: 1
|
||||||
rounded:
|
rounded:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
--- !u!114 &8895738348956266320
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 3
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
|
||||||
m_Name: Bloom
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
active: 0
|
|
||||||
skipIterations:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 1
|
|
||||||
threshold:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0.9
|
|
||||||
intensity:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0
|
|
||||||
scatter:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0.627
|
|
||||||
clamp:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 65472
|
|
||||||
tint:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
highQualityFiltering:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0
|
|
||||||
downscale:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0
|
|
||||||
maxIterations:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 6
|
|
||||||
dirtTexture:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: {fileID: 0}
|
|
||||||
dimension: 1
|
|
||||||
dirtIntensity:
|
|
||||||
m_OverrideState: 0
|
|
||||||
m_Value: 0
|
|
||||||
|
@ -53,12 +53,14 @@ namespace BlueWaterProject
|
|||||||
instantiatedBoss.transform.position = BossSpawnTransform.position;
|
instantiatedBoss.transform.position = BossSpawnTransform.position;
|
||||||
instantiatedBoss.gameObject.SetActive(true);
|
instantiatedBoss.gameObject.SetActive(true);
|
||||||
UiManager.Inst.CombatUi.FieldBossHpSlider.SetHpSlider(instantiatedBoss.MaxHp, instantiatedBoss.Name);
|
UiManager.Inst.CombatUi.FieldBossHpSlider.SetHpSlider(instantiatedBoss.MaxHp, instantiatedBoss.Name);
|
||||||
|
instantiatedBoss.FieldBossHpSlider = UiManager.Inst.CombatUi.FieldBossHpSlider;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
instantiatedBoss = Instantiate(FieldBossPrefab, BossSpawnTransform.position, Quaternion.identity, bossInstantiateLocation);
|
instantiatedBoss = Instantiate(FieldBossPrefab, BossSpawnTransform.position, Quaternion.identity, bossInstantiateLocation);
|
||||||
UiManager.Inst.CombatUi.FieldBossHpSlider.SetHpSlider(instantiatedBoss.MaxHp, instantiatedBoss.Name);
|
UiManager.Inst.CombatUi.FieldBossHpSlider.SetHpSlider(instantiatedBoss.MaxHp, instantiatedBoss.Name);
|
||||||
|
instantiatedBoss.FieldBossHpSlider = UiManager.Inst.CombatUi.FieldBossHpSlider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
|
using UnityEngine.Rendering.Universal;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace BlueWaterProject
|
namespace BlueWaterProject
|
||||||
@ -241,17 +242,20 @@ namespace BlueWaterProject
|
|||||||
var changeHp = Mathf.Max(MyCurrentValue.currentHp - attackerPower, 0);
|
var changeHp = Mathf.Max(MyCurrentValue.currentHp - attackerPower, 0);
|
||||||
SetCurrentHp(changeHp);
|
SetCurrentHp(changeHp);
|
||||||
|
|
||||||
// if (InIslandCamera.Inst.InIslandCam)
|
|
||||||
// {
|
|
||||||
// VisualFeedbackManager.Inst.CameraShake(InIslandCamera.Inst.InIslandCam);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 죽었는지 체크
|
// 죽었는지 체크
|
||||||
if (changeHp == 0f)
|
if (changeHp == 0f)
|
||||||
{
|
{
|
||||||
Die();
|
Die();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (changeHp <= 30f)
|
||||||
|
{
|
||||||
|
CameraManager.Inst.CombatCamera.LowHpVignette();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CameraManager.Inst.CombatCamera.StopLowHpVignette();
|
||||||
|
}
|
||||||
|
|
||||||
StartCoroutine(nameof(FlashWhiteCoroutine));
|
StartCoroutine(nameof(FlashWhiteCoroutine));
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ namespace BlueWaterProject
|
|||||||
[field: SerializeField] public Collider Target { get; set; }
|
[field: SerializeField] public Collider Target { get; set; }
|
||||||
[field: SerializeField] public bool IsUsingSkill { get; protected set; }
|
[field: SerializeField] public bool IsUsingSkill { get; protected set; }
|
||||||
|
|
||||||
|
public FieldBossHpSlider FieldBossHpSlider { get; set; }
|
||||||
protected Vector3 PreviousDirection { get; set; } = Vector3.right;
|
protected Vector3 PreviousDirection { get; set; } = Vector3.right;
|
||||||
|
|
||||||
private Coroutine flashWhiteCoroutine;
|
private Coroutine flashWhiteCoroutine;
|
||||||
@ -83,17 +84,17 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
if (FieldBossHpSlider != null)
|
||||||
|
{
|
||||||
|
FieldBossHpSlider.SetActiveHpSlider(false);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var element in instanceSkillList)
|
foreach (var element in instanceSkillList)
|
||||||
{
|
{
|
||||||
if (element != null)
|
if (element != null)
|
||||||
{
|
{
|
||||||
Destroy(element);
|
Destroy(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UiManager.Inst.CombatUi.FieldBossHpSlider.gameObject.activeSelf)
|
|
||||||
{
|
|
||||||
UiManager.Inst.CombatUi.FieldBossHpSlider.SetActiveHpSlider(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
var changeHp = Mathf.Max(CurrentHp - attackerPower, 0);
|
var changeHp = Mathf.Max(CurrentHp - attackerPower, 0);
|
||||||
SetCurrentHp(changeHp);
|
SetCurrentHp(changeHp);
|
||||||
UiManager.Inst.CombatUi.FieldBossHpSlider.UpdateHpSlider(changeHp);
|
FieldBossHpSlider.UpdateHpSlider(changeHp);
|
||||||
|
|
||||||
// 죽었는지 체크
|
// 죽었는지 체크
|
||||||
if (changeHp == 0f)
|
if (changeHp == 0f)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Cinemachine;
|
using Cinemachine;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering;
|
||||||
|
using UnityEngine.Rendering.Universal;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace BlueWaterProject
|
namespace BlueWaterProject
|
||||||
@ -16,6 +19,8 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
private GameObject cinemachineCameras;
|
private GameObject cinemachineCameras;
|
||||||
private List<CinemachineVirtualCamera> cineCamList;
|
private List<CinemachineVirtualCamera> cineCamList;
|
||||||
|
private Vignette vignette;
|
||||||
|
private Coroutine lowHpVignetteCoroutine;
|
||||||
|
|
||||||
private float originalRotation;
|
private float originalRotation;
|
||||||
|
|
||||||
@ -30,6 +35,9 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
CameraManager.Inst.CombatCamera = this;
|
CameraManager.Inst.CombatCamera = this;
|
||||||
CameraManager.Inst.MainCam = Camera.main;
|
CameraManager.Inst.MainCam = Camera.main;
|
||||||
|
|
||||||
|
vignette = GetEffect<Vignette>();
|
||||||
|
vignette.active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button("셋팅 초기화")]
|
[Button("셋팅 초기화")]
|
||||||
@ -69,5 +77,73 @@ namespace BlueWaterProject
|
|||||||
BaseCombatCamera.Follow = target;
|
BaseCombatCamera.Follow = target;
|
||||||
//BaseCombatCamera.LookAt = target;
|
//BaseCombatCamera.LookAt = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region PostProcessing
|
||||||
|
|
||||||
|
public void ToggleEffect<T>(bool value) where T : VolumeComponent
|
||||||
|
{
|
||||||
|
var effect = GetEffect<T>();
|
||||||
|
if (effect == null)
|
||||||
|
{
|
||||||
|
print(typeof(T) + "효과가 없습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
effect.active = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private T GetEffect<T>() where T : VolumeComponent
|
||||||
|
{
|
||||||
|
var postProcessVolume = FindAnyObjectByType<Volume>();
|
||||||
|
if (postProcessVolume == null)
|
||||||
|
{
|
||||||
|
print("Volume 컴포넌트를 가진 오브젝트가 없습니다.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
postProcessVolume.profile.TryGet(out T effect);
|
||||||
|
return effect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LowHpVignette()
|
||||||
|
{
|
||||||
|
if (lowHpVignetteCoroutine == null)
|
||||||
|
{
|
||||||
|
lowHpVignetteCoroutine = StartCoroutine(LowHpVignetteCoroutine());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StopLowHpVignette()
|
||||||
|
{
|
||||||
|
if (lowHpVignetteCoroutine != null)
|
||||||
|
{
|
||||||
|
StopCoroutine(lowHpVignetteCoroutine);
|
||||||
|
lowHpVignetteCoroutine = null;
|
||||||
|
|
||||||
|
vignette.active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator LowHpVignetteCoroutine()
|
||||||
|
{
|
||||||
|
var startValue = 0.2f;
|
||||||
|
var endValue = 0.3f;
|
||||||
|
var time = 0f;
|
||||||
|
|
||||||
|
vignette.intensity.value = startValue;
|
||||||
|
vignette.active = true;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
time += Time.deltaTime * 2f;
|
||||||
|
vignette.intensity.value = Mathf.Lerp(startValue, endValue, time);
|
||||||
|
if (time >= 1f)
|
||||||
|
{
|
||||||
|
(startValue, endValue) = (endValue, startValue);
|
||||||
|
time = 0f;
|
||||||
|
}
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user