Ver 0.2.3.1 수정사항

+ Props 레이어, DamageableProps 레이어 구분
+ 변경된 레이어에 따라서 TargetLayer들 변경
+ ProjectileController, GateOfSpike 로직 수정
+ Daily Bgm2로 변경
This commit is contained in:
Nam Tae Gun 2024-06-25 22:06:15 +09:00
parent bb10ead082
commit e2abbf99f0
46 changed files with 232 additions and 36 deletions

View File

@ -11006,7 +11006,7 @@ MonoBehaviour:
<TitanSlimeMapController>k__BackingField: {fileID: 36953787}
<RhinocerosMapController>k__BackingField: {fileID: 1011270532}
<SandMoleMapController>k__BackingField: {fileID: 1213070730}
<DailyBgm>k__BackingField: DailyBgm1
<DailyBgm>k__BackingField: DailyBgm2
--- !u!4 &1597727070
Transform:
m_ObjectHideFlags: 0

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
namespace BlueWater.Enemies.Bosses
@ -67,6 +68,7 @@ namespace BlueWater.Enemies.Bosses
/// 사용하기 전에 CanSkill() 함수를 통해서 사용이 가능한 스킬인지 먼저 체크해야 합니다.
/// </summary>
/// <param name="skillName"></param>
[Button("스킬 사용")]
public void ActivateSkill(string skillName)
{
if (!_instantiateSkillDictionary.TryGetValue(skillName, out var skill))

View File

@ -52,6 +52,7 @@ namespace BlueWater
private float _detectionDistance;
private Collider[] _hitColliders;
private bool _isHitCheckRealtime;
public Action OnHitAction;
@ -103,17 +104,14 @@ namespace BlueWater
//var direction = _rigidbody.linearVelocity.normalized;
_detectionDistance = _rigidbody.linearVelocity.magnitude * Time.deltaTime;
if (!_isHitCheckRealtime) return;
var hitCount = Physics.OverlapSphereNonAlloc(transform.position, SphereRadius, _hitColliders, _targetLayer, QueryTriggerInteraction.Collide);
if (hitCount == 0) return;
// transform.position = raycastHit.point + raycastHit.normal * _collideOffset;
var hitCollider = _hitColliders[0];
if (hitCollider.gameObject.layer == LayerMask.NameToLayer("Props")
&& !hitCollider.CompareTag("DamageableProps"))
{
return;
}
var trailParticles = GetComponentsInChildren<ParticleSystem>();
foreach (var element in trailParticles)
{
@ -140,10 +138,46 @@ namespace BlueWater
Destroy(gameObject);
}
public void Initialize(int attackDamage, LayerMask targetLayer, Action onHitAction = null)
public void DoAttack()
{
_hitColliders = new Collider[8];
var hitCount = Physics.OverlapSphereNonAlloc(transform.position, SphereRadius, _hitColliders, _targetLayer, QueryTriggerInteraction.Collide);
// transform.position = raycastHit.point + raycastHit.normal * _collideOffset;
var trailParticles = GetComponentsInChildren<ParticleSystem>();
foreach (var element in trailParticles)
{
if (!element.gameObject.name.Contains("Trail")) continue;
element.transform.SetParent(null);
Destroy(element.gameObject, 2f);
}
for (var i = 0; i < hitCount; i++)
{
// TODO : HitBox가 레이어로 설정되어있으도, 부모 객체 Player를 계속 가져오는 버그가 있음
var iDamageable = _hitColliders[i].GetComponentInParent<IDamageable>();
if (iDamageable == null || !iDamageable.CanDamage()) continue;
iDamageable.TakeDamage(_attackDamage);
OnHitAction?.Invoke();
}
var impactParticle = Instantiate(ImpactParticle, transform.position, Quaternion.identity);
Destroy(_projectilePrefab, 3f);
if (impactParticle)
{
Destroy(impactParticle, 3.5f);
}
Destroy(gameObject);
}
public void Initialize(int attackDamage, LayerMask targetLayer, bool isHitCheckRealtime = true, Action onHitAction = null)
{
_attackDamage = attackDamage;
_targetLayer = targetLayer;
_isHitCheckRealtime = isHitCheckRealtime;
OnHitAction = onHitAction;
}

View File

@ -80,9 +80,11 @@ namespace BlueWater
yield return null;
}
_projectileObject.transform.position = _destination;
_indicator.material.SetFloat(_fillHash, 1f);
HideIndicator();
_projectileObject.DoAttack();
Destroy(gameObject, 3.5f);
}

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
<ChargeSpeed>k__BackingField: 25
<ChargeOffset>k__BackingField: 3
<PushPower>k__BackingField: 10

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
<AttackOffset>k__BackingField: 3
<PushPower>k__BackingField: 5
<StunDuration>k__BackingField: 0.05

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
<AttackAngle>k__BackingField: 180
<ProjectilePrefab>k__BackingField: {fileID: 194276104676398060, guid: b72f1dbff188be247a8253665b2c1b26, type: 3}
<ProjectileCount>k__BackingField: 5

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
<HorizontalRange>k__BackingField: 3
<SeismicThrustParticle>k__BackingField: {fileID: 4571145888420713692, guid: 783e2b88976de334696bcd02854292ba, type: 3}
<PushPower>k__BackingField: 10

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
<JumpTime>k__BackingField: 0.1
<JumpHeight>k__BackingField: 30
<WaitTime>k__BackingField: 2

View File

@ -22,9 +22,9 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2496
m_Bits: 67776
<SpikePrefab>k__BackingField: {fileID: 9002322086633083442, guid: 90f6fd643c61df44a908c9d621fd7827, type: 3}
<SpikeCount>k__BackingField: 10
<SpikeCount>k__BackingField: 15
<MinDistanceBetweenAttacks>k__BackingField: 1
<GroundLayer>k__BackingField:
serializedVersion: 2

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2432
m_Bits: 67712
<WallLayer>k__BackingField:
serializedVersion: 2
m_Bits: 128

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2432
m_Bits: 67712
<SpikePrefab>k__BackingField: {fileID: 194276104676398060, guid: 74d380cc223e6a5419f3aa88df2d767c, type: 3}
<SpikeCount>k__BackingField: 4
<SpikeInterval>k__BackingField: 0.5

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2432
m_Bits: 67712
<WallLayer>k__BackingField:
serializedVersion: 2
m_Bits: 128

View File

@ -22,7 +22,7 @@ MonoBehaviour:
<Duration>k__BackingField: 0
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 2432
m_Bits: 67712
<DissolveTime>k__BackingField: 1
<SpawnDissolveTime>k__BackingField: 1
<SpikePrefab>k__BackingField: {fileID: 194276104676398060, guid: 74d380cc223e6a5419f3aa88df2d767c, type: 3}

View File

@ -82,7 +82,7 @@ namespace BlueWater.Enemies.Bosses.SandMole.Skills
_spikes.Add(randomPosition);
var spike = Instantiate(_gateOfSpikesData.SpikePrefab, spikeSpawnPosition, Quaternion.identity,
_particleInstantiateLocation).GetComponent<GateOfSpike>();
spike.GetComponentInChildren<ProjectileController>().Initialize(_gateOfSpikesData.Damage, _gateOfSpikesData.TargetLayer);
spike.GetComponentInChildren<ProjectileController>().Initialize(_gateOfSpikesData.Damage, _gateOfSpikesData.TargetLayer, false);
spike.Initialize(randomPosition);
}

View File

@ -38,7 +38,6 @@ Material:
disabledShaderPasses:
- MOTIONVECTORS
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3

View File

@ -554,7 +554,7 @@ MonoBehaviour:
<MovePower>k__BackingField: 2
<TargetLayer>k__BackingField:
serializedVersion: 2
m_Bits: 4352
m_Bits: 69632
<MouseClickLayer>k__BackingField:
serializedVersion: 2
m_Bits: 32832
@ -576,6 +576,7 @@ MonoBehaviour:
<MaxHealthPoint>k__BackingField: 4
<CurrentHealthPoint>k__BackingField: 0
<InvincibilityDuration>k__BackingField: 0.5
<IsInvincible>k__BackingField: 0
--- !u!114 &3677775080446906429
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -100,10 +100,10 @@ MonoBehaviour:
_muzzleParticle: {fileID: 0}
<ImpactParticle>k__BackingField: {fileID: 151374, guid: 349d61d7e99fa484bb25bbffddabd8bc, type: 3}
_colliderRadius: 0.5
_collideOffset: 0
_attackDamage: 1
_targetLayer:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
_useAutoDestroy: 1
_autoDestroyTime: 10
_awakeSfxName:

View File

@ -57,8 +57,8 @@ Rigidbody:
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 1
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!135 &8035217722497169373
@ -103,6 +103,7 @@ MonoBehaviour:
_attackDamage: 1
_targetLayer:
serializedVersion: 2
m_Bits: 2496
m_Bits: 2240
_useAutoDestroy: 1
_autoDestroyTime: 10
_awakeSfxName:

View File

@ -103,7 +103,7 @@ MonoBehaviour:
_attackDamage: 1
_targetLayer:
serializedVersion: 2
m_Bits: 2432
m_Bits: 2176
_useAutoDestroy: 1
_autoDestroyTime: 10
_awakeSfxName: ThrowSpike

View File

@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 7986070582027999988}
- component: {fileID: 2892108968249248585}
- component: {fileID: 1772409705626034443}
m_Layer: 8
m_Layer: 16
m_Name: BaseDamageableProps
m_TagString: DamageableProps
m_Icon: {fileID: 0}
@ -92,7 +92,7 @@ GameObject:
m_Component:
- component: {fileID: 7438534416270888028}
- component: {fileID: 3580758810857167321}
m_Layer: 8
m_Layer: 0
m_Name: VisualLook
m_TagString: Untagged
m_Icon: {fileID: 0}

View File

@ -10,7 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 6229300703101880482}
- component: {fileID: 5119753316800573436}
m_Layer: 8
m_Layer: 0
m_Name: Shadow
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -97,7 +97,7 @@ GameObject:
m_Component:
- component: {fileID: 1426941151981288099}
- component: {fileID: 6370181286260610806}
m_Layer: 8
m_Layer: 0
m_Name: Indicator
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -179,6 +179,10 @@ PrefabInstance:
propertyPath: m_Name
value: Rockfall
objectReference: {fileID: 0}
- target: {fileID: 3764902268943045601, guid: bfc5c806b2fa3ba40850df302d3db0b7, type: 3}
propertyPath: m_Layer
value: 16
objectReference: {fileID: 0}
- target: {fileID: 7438534416270888028, guid: bfc5c806b2fa3ba40850df302d3db0b7, type: 3}
propertyPath: m_LocalScale.x
value: 2
@ -207,6 +211,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7835622629792856689, guid: bfc5c806b2fa3ba40850df302d3db0b7, type: 3}
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7835622629792856689, guid: bfc5c806b2fa3ba40850df302d3db0b7, type: 3}
propertyPath: m_IsActive
value: 1
@ -305,7 +313,7 @@ MonoBehaviour:
_isUsingIndicator: 1
_targetLayer:
serializedVersion: 2
m_Bits: 2048
m_Bits: 67584
_groundLayer:
serializedVersion: 2
m_Bits: 64

View File

@ -60,10 +60,18 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2752040085647730666, guid: 384b448f89341e84bb003cb48e37bb7d, type: 3}
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3210918493867778633, guid: 384b448f89341e84bb003cb48e37bb7d, type: 3}
propertyPath: m_Name
value: SummerGrass01
objectReference: {fileID: 0}
- target: {fileID: 3210918493867778633, guid: 384b448f89341e84bb003cb48e37bb7d, type: 3}
propertyPath: m_Layer
value: 16
objectReference: {fileID: 0}
- target: {fileID: 3210918493867778633, guid: 384b448f89341e84bb003cb48e37bb7d, type: 3}
propertyPath: m_TagString
value: DamageableProps

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 59c5c73275d5dc24e86b15fa0c096fc6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aedd64c71808f2744a5d7548cc71ab31
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a421a1d40bb6873448fb56216aceb0db
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d0ea7b4db6a72ab478fb5882f6701d4e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8687348a7454d414395b305a8d3ee5b9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aabe8f32671273c4bbd2b89451c457eb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1b049f0ecf916d24db335df912c531d7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5de603c9aab95b04d8ebb1b492b94898
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3d7c4217783978e4abe6496ac71eee94
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 687baaea481bf4234b879dce13527276
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 617b3f1032a08c14ebfedfa340767cdf
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f597f19f656ba56eae4f6a3a7cc528f4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 48e08dc33330d11e9d4a1b246c52e4f6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ed09910c0094cb27be8f3ca264680da3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cc355dd4cf1e6173beaeb22c2858cbe1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 410a8ae13e6a3724ebf4f639e26ffa26
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 27a762b0337996843b33a98c4c1f03b8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2f1b9c7f4731e2d44af6b3606190070b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c226d4e6697573345932a7bf39dd615a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3643c0d76ec153646b1203880bfb64ed
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -17,7 +17,7 @@ PhysicsManager:
m_EnableAdaptiveForce: 0
m_ClothInterCollisionDistance: 0
m_ClothInterCollisionStiffness: 0
m_LayerCollisionMatrix: ff3f000001000000010000000100000001000000010000000167000001670000c1670000c1010000c10100000100000001000000c1210000c00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_LayerCollisionMatrix: 0000000000000000000000000000000000000000000000000067010000670100c0670100c0010100c00101000000000000000000c0210100c001010000000000c0670100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_SimulationMode: 0
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1

View File

@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 0.2.3.0
bundleVersion: 0.2.3.1
preloadedAssets:
- {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
metroInputSource: 0

View File

@ -24,7 +24,7 @@ TagManager:
- Item
- Npc
- ClickGround
-
- DamageableProps
-
-
-