환영검무 작업 중...

This commit is contained in:
Ino 2025-01-17 09:28:44 +09:00
parent 2f71efcd36
commit 61d425e6e8
14 changed files with 2642 additions and 112 deletions

File diff suppressed because one or more lines are too long

View File

@ -127,7 +127,7 @@ Material:
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _BaseColor: {r: 0.49411765, g: 0.14509805, b: 0.16470589, a: 1} - _BaseColor: {r: 0.49411765, g: 0.14509805, b: 0.16470589, a: 1}
- _Color: {r: 0.49411765, g: 0.14509805, b: 0.16470589, a: 1} - _Color: {r: 0.49411762, g: 0.145098, b: 0.16470584, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0} - _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1974,6 +1974,12 @@ AnimatorStateMachine:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: -3180731614763140707} m_State: {fileID: -3180731614763140707}
m_Position: {x: -260, y: -170, z: 0} m_Position: {x: -260, y: -170, z: 0}
- serializedVersion: 1
m_State: {fileID: 3939311633111956318}
m_Position: {x: -260, y: -50, z: 0}
- serializedVersion: 1
m_State: {fileID: 2487565391451115918}
m_Position: {x: -260, y: -110, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []
@ -2250,6 +2256,58 @@ AnimatorStateTransition:
m_InterruptionSource: 0 m_InterruptionSource: 0
m_OrderedInterruption: 1 m_OrderedInterruption: 1
m_CanTransitionToSelf: 1 m_CanTransitionToSelf: 1
--- !u!1102 &2487565391451115918
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ass_skill3
m_Speed: 0
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 32a83b4f73d533f4ba4393e494670234, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &3939311633111956318
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ass_skill3_attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 9cc50abd895270c4c9bcd33ed909323a, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &4581454969299528233 --- !u!1101 &4581454969299528233
AnimatorStateTransition: AnimatorStateTransition:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

View File

@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3280100619647823221
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8911789100912857807}
- component: {fileID: 3899472576749596654}
m_Layer: 0
m_Name: Skill_PhantomFrenzy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8911789100912857807
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3280100619647823221}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3899472576749596654
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3280100619647823221}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8260736bd9b784c498ebb5efd5a412f3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Pierce: 0
str_HitEffect:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 92facb4f58572b94da2b9669aaa05e23
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,7 +2,6 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.AI; using UnityEngine.AI;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
@ -56,6 +55,7 @@ public class Actor : MyCoroutine
protected Dictionary<eSkillExtraType, bool> dic_skillextra = new Dictionary<eSkillExtraType, bool>(); protected Dictionary<eSkillExtraType, bool> dic_skillextra = new Dictionary<eSkillExtraType, bool>();
protected Dictionary<eCC, CCData> dic_ccData = new Dictionary<eCC, CCData>(); protected Dictionary<eCC, CCData> dic_ccData = new Dictionary<eCC, CCData>();
protected Dictionary<eCC, Dictionary<Actor, double>> dic_ccAddRate = new Dictionary<eCC, Dictionary<Actor, double>>(); protected Dictionary<eCC, Dictionary<Actor, double>> dic_ccAddRate = new Dictionary<eCC, Dictionary<Actor, double>>();
protected void Init_CC() protected void Init_CC()
{ {
if (dic_ccData.Count == 0) if (dic_ccData.Count == 0)
@ -196,7 +196,7 @@ public class Actor : MyCoroutine
} }
} }
protected bool isPlaying() public bool isPlaying()
{ {
float normalizedTime = m_animation.GetCurrentAnimatorStateInfo(0).normalizedTime; float normalizedTime = m_animation.GetCurrentAnimatorStateInfo(0).normalizedTime;
@ -266,109 +266,6 @@ public class Actor : MyCoroutine
Play_Idle(); Play_Idle();
} }
} }
public virtual void Set_JoystickStatus(int status) { }
public void Set_Warp(Vector3 _pos)
{
if (m_BoxCollider) m_BoxCollider.enabled = true;
m_NavMeshAgent.enabled = true; // 사망 시 off 됨. 다시 세팅될 때 켜줌
m_NavMeshAgent.Warp(_pos);
}
public virtual void Run_byJoystick(Vector3 _v) { }
protected void StopMove_Imm(bool setIdle)
{
if (setIdle) CurAnim = eAnim.Idle;
if (m_NavMeshAgent.isOnNavMesh)
{
m_NavMeshAgent.isStopped = true;
m_NavMeshAgent.ResetPath(); // 경로를 비워서 멈춤
m_NavMeshAgent.velocity = Vector3.zero; // 이 경우도 velocity를 0으로 설정
}
}
int FindCount = 0;
protected bool Set_Path(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
NavMeshPath path = new NavMeshPath();
m_NavMeshAgent.CalculatePath(_pos, path);
switch (path.status)
{
case NavMeshPathStatus.PathComplete:
m_NavMeshAgent.speed = Get_MoveSpeed();
m_NavMeshAgent.SetPath(path);
FindCount = 0; // 성공 시 초기화
return true;
case NavMeshPathStatus.PathPartial:
++FindCount;
Debug.Log($"Path Partial. Attempt: {FindCount}");
if (FindCount > 5)
{
FindCount = 0;
return false;
}
var newpos = DSUtil.Get_RandomPos_onNavMesh(_pos, 0f, 5f);
return Set_Path(newpos);
case NavMeshPathStatus.PathInvalid:
Debug.LogWarning("Path Invalid.");
// 적 근처로 워프넣어볼까?
//Set_Warp(DSUtil.Get_RandomPos_onNavMesh(_pos, 3f));
break;
}
}
return false;
}
protected void Set_Move(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
m_fAttackMoveTime = 1f;
#if UNITY_EDITOR
if (SceneManager.GetActiveScene().name == "StatTest")
m_fAttackMoveTime = 0f;
#endif
m_NavMeshAgent.stoppingDistance = 0; // 툴에서 사용 용도
m_NavMeshAgent.isStopped = false;
m_NavMeshAgent.angularSpeed = 0f;
NavMeshPath path = new NavMeshPath();
m_NavMeshAgent.CalculatePath(_pos, path);
switch (path.status)
{
case NavMeshPathStatus.PathComplete:
m_NavMeshAgent.SetPath(path);
break;
}
}
}
protected void Set_Destination(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
m_NavMeshAgent.ResetPath();
m_NavMeshAgent.SetDestination(_pos);
}
}
protected bool Complete_Destination()
{
if (m_NavMeshAgent.isOnNavMesh && !m_NavMeshAgent.pathPending)
if (m_NavMeshAgent.remainingDistance <= m_NavMeshAgent.stoppingDistance)
if (!m_NavMeshAgent.hasPath || m_NavMeshAgent.velocity.sqrMagnitude == 0f)
return true;
return false;
}
public void ReCal_NaveMesh()
{
//return; // TODO 정인호 : 내비메시의 이상한 위치에 있으면 주변을 검색해서 내비메시 위로 올리는데 이상한 위치로 갈 수 있어서 일단 다시 뺌
if (m_ID != 61 && m_NavMeshAgent && m_NavMeshAgent.enabled)
{
var newpos = DSUtil.Get_RandomPos_onNavMesh(Get_position(), 0f, 1f);
if (!Vector3.Equals(newpos, Get_position()))
Set_Warp(newpos);
}
}
public void Set_AttackCoolTime(float _rate) public void Set_AttackCoolTime(float _rate)
{ {
@ -811,7 +708,7 @@ public class Actor : MyCoroutine
IEnumerator Co_JumpAttack(float heightPos_y, float duration) IEnumerator Co_JumpAttack(float heightPos_y, float duration)
{ {
var startPos = Get_position(); // 현재 위치 var startPos = Get_position(); // 현재 위치
var targetPos = Get_TeleportPostion(); var targetPos = Get_TeleportPostion(m_Target);
var elapsed = 0f; var elapsed = 0f;
@ -866,11 +763,11 @@ public class Actor : MyCoroutine
public Vector3 Get_CenterPositionFoward(float dist = 1f) { return Get_Center_position() + transform.forward * dist; } public Vector3 Get_CenterPositionFoward(float dist = 1f) { return Get_Center_position() + transform.forward * dist; }
public Vector3 Get_PositionFoward(float dist = 1f) { return Get_position() + transform.forward * dist; } public Vector3 Get_PositionFoward(float dist = 1f) { return Get_position() + transform.forward * dist; }
public Vector3 Get_PositionBack(float dist = 1f) { return Get_position() + -transform.forward * dist; } public Vector3 Get_PositionBack(float dist = 1f) { return Get_position() + -transform.forward * dist; }
public Vector3 Get_TeleportPostion(float dist = 1f) public Vector3 Get_TeleportPostion(Actor target, float dist = 1f)
{ {
var startPos = Get_position(); // 현재 위치 var startPos = Get_position(); // 현재 위치
Vector3 direction = (m_Target.Get_position() - Get_position()).normalized; // 목표와 현재 위치의 방향 벡터를 구함 Vector3 direction = (target.Get_position() - Get_position()).normalized; // 목표와 현재 위치의 방향 벡터를 구함
return m_Target.Get_position() - direction * 1f; // 목표 위치에서 -1f 앞 지점 계산 return target.Get_position() - direction * 1f; // 목표 위치에서 -1f 앞 지점 계산
} }
public float Get_ScaleSizeDist() { return transform.localScale.x > 2f ? ObjSize.z * 0.5f : 0f; } public float Get_ScaleSizeDist() { return transform.localScale.x > 2f ? ObjSize.z * 0.5f : 0f; }
public ActorStatInfo Get_StatInfo() { return m_Stat; } public ActorStatInfo Get_StatInfo() { return m_Stat; }
@ -1802,6 +1699,124 @@ public class Actor : MyCoroutine
yield break; yield break;
} }
#endregion #endregion
#region
/// <summary>
/// TelepoetPosion으로 이동
/// </summary>
public virtual void MoveToTarget(Actor target, float stopdist, Action _movecomplete = null, float dist = 1f)
{
StartCoroutine(Co_MoveToTarget(target, stopdist, _movecomplete, dist));
}
IEnumerator Co_MoveToTarget(Actor target, float stopdist, Action _movecomplete, float dist)
{
m_NavMeshAgent.stoppingDistance = stopdist;
Set_Path(Get_TeleportPostion(target, dist));
while (!Complete_Destination()) yield return null;
_movecomplete?.Invoke();
m_NavMeshAgent.stoppingDistance = m_NavStopDistance;
}
public virtual void Set_JoystickStatus(int status) { }
public void Set_Warp(Vector3 _pos)
{
if (m_BoxCollider) m_BoxCollider.enabled = true;
m_NavMeshAgent.enabled = true; // 사망 시 off 됨. 다시 세팅될 때 켜줌
m_NavMeshAgent.Warp(_pos);
}
public virtual void Run_byJoystick(Vector3 _v) { }
protected void StopMove_Imm(bool setIdle)
{
if (setIdle) CurAnim = eAnim.Idle;
if (m_NavMeshAgent.isOnNavMesh)
{
m_NavMeshAgent.isStopped = true;
m_NavMeshAgent.ResetPath(); // 경로를 비워서 멈춤
m_NavMeshAgent.velocity = Vector3.zero; // 이 경우도 velocity를 0으로 설정
}
}
int FindCount = 0;
protected bool Set_Path(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
NavMeshPath path = new NavMeshPath();
m_NavMeshAgent.CalculatePath(_pos, path);
switch (path.status)
{
case NavMeshPathStatus.PathComplete:
m_NavMeshAgent.speed = Get_MoveSpeed();
m_NavMeshAgent.SetPath(path);
FindCount = 0; // 성공 시 초기화
return true;
case NavMeshPathStatus.PathPartial:
++FindCount;
Debug.Log($"Path Partial. Attempt: {FindCount}");
if (FindCount > 5)
{
FindCount = 0;
return false;
}
var newpos = DSUtil.Get_RandomPos_onNavMesh(_pos, 0f, 5f);
return Set_Path(newpos);
case NavMeshPathStatus.PathInvalid:
Debug.LogWarning("Path Invalid.");
// 적 근처로 워프넣어볼까?
//Set_Warp(DSUtil.Get_RandomPos_onNavMesh(_pos, 3f));
break;
}
}
return false;
}
protected void Set_Move(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
m_fAttackMoveTime = 1f;
#if UNITY_EDITOR
if (SceneManager.GetActiveScene().name == "StatTest")
m_fAttackMoveTime = 0f;
#endif
m_NavMeshAgent.stoppingDistance = 0; // 툴에서 사용 용도
m_NavMeshAgent.isStopped = false;
m_NavMeshAgent.angularSpeed = 0f;
NavMeshPath path = new NavMeshPath();
m_NavMeshAgent.CalculatePath(_pos, path);
switch (path.status)
{
case NavMeshPathStatus.PathComplete:
m_NavMeshAgent.SetPath(path);
break;
}
}
}
protected void Set_Destination(Vector3 _pos)
{
if (m_NavMeshAgent.enabled && m_NavMeshAgent.isOnNavMesh)
{
m_NavMeshAgent.ResetPath();
m_NavMeshAgent.SetDestination(_pos);
}
}
protected bool Complete_Destination()
{
if (m_NavMeshAgent.isOnNavMesh && !m_NavMeshAgent.pathPending)
if (m_NavMeshAgent.remainingDistance <= m_NavMeshAgent.stoppingDistance)
if (!m_NavMeshAgent.hasPath || m_NavMeshAgent.velocity.sqrMagnitude == 0f)
return true;
return false;
}
public void ReCal_NaveMesh()
{
//return; // TODO 정인호 : 내비메시의 이상한 위치에 있으면 주변을 검색해서 내비메시 위로 올리는데 이상한 위치로 갈 수 있어서 일단 다시 뺌
if (m_ID != 61 && m_NavMeshAgent && m_NavMeshAgent.enabled)
{
var newpos = DSUtil.Get_RandomPos_onNavMesh(Get_position(), 0f, 1f);
if (!Vector3.Equals(newpos, Get_position()))
Set_Warp(newpos);
}
}
#endregion
public bool CanMove() { return !IsCC() && m_NavMeshAgent.isOnNavMesh && !m_NavMeshAgent.isStopped; } public bool CanMove() { return !IsCC() && m_NavMeshAgent.isOnNavMesh && !m_NavMeshAgent.isStopped; }
protected virtual bool IsAvoidCoolTime() { return false; } protected virtual bool IsAvoidCoolTime() { return false; }

View File

@ -0,0 +1,53 @@
using CodeStage.AntiCheat.ObscuredTypes;
using System.Collections;
using UnityEngine;
public class Skill_PhantomFrenzy : ProjectileBase
{
[Header("공격 애니메이션")]
public string attackAnimationName = "ass_skill3_attack";
[Header("공격 횟수")]
public int AttackCount = 7;
[Header("공격 거리")]
public float AttackDistance = 10f;
public override void Set(ProjectileData _data)
{
base.Set(_data);
StartCoroutine(Co_Update());
}
IEnumerator Co_Update()
{
// 이동 비활성화
OptionInfo.Ins.PCMove = false;
var shooter = m_ProjectTileData.shooter;
ObscuredInt attackTimes = AttackCount; // 공격 횟수 설정
attackTimes.RandomizeCryptoKey();
Actor target = m_ProjectTileData.target;
while (attackTimes > 0)
{
bool moveCompleted = false;
// 목표 지점으로 이동 (이동 완료 시 moveCompleted = true)
shooter.MoveToTarget(target, 0.5f, () => moveCompleted = true);
// 공격 애니메이션 실행
shooter.AnimationPlay(attackAnimationName);
// 이동 완료 대기
while (!moveCompleted || shooter.isPlaying()) yield return null;
// 남은 공격 횟수 감소
--attackTimes;
attackTimes.RandomizeCryptoKey();
target = ActorInfo.Ins.Get_Far_EnemyActor_orNull(shooter.IsEnemy(), shooter.Get_position(), AttackDistance);
if (DSUtil.CheckNull(target)) break;
}
// 이동 활성화 및 대기 상태로 전환
OptionInfo.Ins.PCMove = true;
shooter.Play_Idle();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8260736bd9b784c498ebb5efd5a412f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -221,6 +221,32 @@ public class ActorInfo : MonoBehaviour
return nearest; return nearest;
} }
/// <summary>
/// 특정 거리 내에서 가장 먼 적을 찾는다.
/// </summary>
public Actor Get_Far_EnemyActor_orNull(bool isEnemy, Vector3 pos, float dist = 10f)
{
var actors = Get_EnemyActors(isEnemy, pos, dist);
//return actors.OrderByDescending(a => (pos - a.Get_position()).sqrMagnitude).FirstOrDefault();
Actor far = actors.Count > 0 ? actors[0] : null;
if (DSUtil.CheckNull(far)) return null;
float farDistSqr = (pos - far.Get_position()).sqrMagnitude;
foreach (var actor in actors)
{
float distanceSqr = (pos - actor.Get_position()).sqrMagnitude; // 제곱 거리 계산
if (distanceSqr > farDistSqr)
{
farDistSqr = distanceSqr;
far = actor;
}
}
Release_Actors(actors);
return far;
}
/// <summary> /// <summary>
/// 가장 가까운 동맹 하나를 찾는다. /// 가장 가까운 동맹 하나를 찾는다.
/// </summary> /// </summary>

View File

@ -201,7 +201,7 @@ public enum eEffect
Skill_IceBolt, Skill_Fireball, Skill_FireBolt, Skill_EnergyBall, Skill_Blizzard, Skill_Flower, Skill_Golem, Skill_EarthWorm, Skill_IceBolt, Skill_Fireball, Skill_FireBolt, Skill_EnergyBall, Skill_Blizzard, Skill_Flower, Skill_Golem, Skill_EarthWorm,
Skill_Hurricane, Skill_EatSnack, Skill_ShieldAttack, Skill_JumpAttack, Skill_ManaBurst, Skill_DaggerThrow, Skill_OneHandCombo1, Skill_Hurricane, Skill_EatSnack, Skill_ShieldAttack, Skill_JumpAttack, Skill_ManaBurst, Skill_DaggerThrow, Skill_OneHandCombo1,
Skill_FatalBlow, Skill_DashSlash, Skill_EnergySlash, Skill_BrutalSlash, Skill_Berserk, Skill_EarthSlam, Skill_Whirlwind, Skill_FatalBlow, Skill_DashSlash, Skill_EnergySlash, Skill_BrutalSlash, Skill_Berserk, Skill_EarthSlam, Skill_Whirlwind,
Skill_SweepAttack, Skill_VitalStrike, Skill_DeathBlade, Skill_ShadowSlash, Skill_DarkAmbush, Skill_SweepAttack, Skill_VitalStrike, Skill_DeathBlade, Skill_ShadowSlash, Skill_DarkAmbush, Skill_PhantomFrenzy,
Skill_Poison, Skill_Poison,