Project_WL/Assets/Script/Character/PC/WizardActor.cs

122 lines
4.1 KiB
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class WizardActor : PCActor
{
float t = 1f;
void Shoot_MyProjectile()
{
Reset_AttackCoolTime();
m_DamageRate = 1f;
if (InGameInfo.Ins.Get_SelectSkillData(eEffect.Select_DoubleShot))
{
m_DamageRate = table_selectskill.Ins.Get_Data(eEffect.Select_DoubleShot).ValueBase;
Set_Coroutine(Shoot_MagicMissile, 0.25f);
}
if (InGameInfo.Ins.Get_SelectSkillData(eEffect.Select_TripleShot))
{
m_DamageRate = table_selectskill.Ins.Get_Data(eEffect.Select_TripleShot).ValueBase;
Set_Coroutine(Shoot_MagicMissile, 0.5f);
}
Shoot_MagicMissile();
}
void Shoot_MagicMissile()
{
ProjectileInfo.Ins.Shoot_Projectile("MagicMissile", this, m_Target, m_DamageRate, Get_CenterPositionFoward(), 10f);
2024-12-15 01:39:39 +00:00
#if UNITY_EDITOR
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest") return;
#endif
//NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.JoystickAttack);
2024-12-15 01:39:39 +00:00
}
private void OnTriggerEnter(Collider other)
{
if (other.tag.Equals("House"))
MyValue.m_RealCamera.Set_InsideBuilding(true);
}
private void OnTriggerExit(Collider other)
{
if (other.tag.Equals("House"))
MyValue.m_RealCamera.Set_InsideBuilding(false);
}
public override void Move(float b)
{
base.Move(b);
#if UNITY_EDITOR
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest") return;
#endif
WL 리뉴얼 세션 2026-09-06~07 (#760~#800) — 전투·배경·UI·타격감 (조직 PD 로그 #746~#800 · 대화로그 §14~§24) - 전투: Knight@Attack1~3_S 3콤보(4 컨트롤러·클래스별 서브클립) · 타겟팅 4규칙(정면 우선·재타겟·즉시 공격·어그로 금지 · WLTargetingSettings) · 대쉬 후 공격(Stander@Chase_Start · DashDriver · 5 m · 사정거리+0.8 · 근거리 적 우선) · 공격 이동 FrameTable(발 접지 실측 표 · AttackRootMotion) · 충돌 반경/투사체 0.3 배(WLCollisionTuning) · 무적(임시)·펫 금지(WLGameplaySettings) - 검기: NamuFX Slash_B 배리언트 Effect_WLSwingArc 원 피팅 정합 배치 + 캘리브레이션(SlashArcMeasure · SlashTrailSettings) · 찌르기 Effect_WLStab 대기 · 램프 리본(BladeTrail · WL_BladeRibbon.shader · T_WL_BladeRibbonRamp) 보존(drawRibbon 0) - 타격감: Assets/WL/Feel(WLHitFeel · 히트스톱 0.03 · 셰이크 0.10 m · 몹 펀치 1.12 · Actor.Get_Damage 훅 1줄 · 원본 RealCamera 셰이크 결함 대체) - 배경/맵: LMHPOLY Demo_01~10 → WL_Nature01~10(프리팹·씬·NavMesh·스포너·BattleMapConfig) · 물(ToonWaterU) · 포스트 블룸 0.9/0.3 · 잔디(BruteForce·드레싱) 제거 · 마젠타 머티리얼 URP 변환 - UI: 세로 HUD(WL_HUD · 하단 5메뉴 폭 전체 · 채팅/전투 패드 숨김 · WLIngameUiOverride) · Title/TitleInfo 1080×1920 Expand + 배경 높이 fit(WLBackgroundFit) · 로딩 SortOrder_5(WLRawImageAspectSync · 초점표 8장) · Loading1~8 ASTC 6×6 - 도구: AgentScripts/*(LightProbe · WL_MapSwitch · WL760~WL800 프로브/집행/검증 · 상단 사용법 주석) · 에디터 락 프로토콜 파일(staging) - 제외(별도 커밋 예정): Assets/LMHPOLY(703 MB) · Assets/Feel(422 MB) · Assets/Shinabro(300 MB) — 에셋 스토어/구 WL 팩 원본 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 23:24:25 +00:00
if (WL.Combat.AttackRootMotion.HandlesAttackMove(this)) return; // PD #789: 클립 루트모션 모드에서는 걷기 전진(Set_Move)을 쓰지 않는다
2024-12-15 01:39:39 +00:00
Set_Move(transform.position + transform.forward * b);
}
public override void Interpolation(string s)
{
base.Interpolation(s);
#if UNITY_EDITOR
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "StatTest") return;
#endif
StartCoroutine(Co_Interpolation(s));
}
IEnumerator Co_Interpolation(string s)
{
var dic_frame = new Dictionary<int, bool>();
var clips = m_animation.GetCurrentAnimatorClipInfo(0);
if (clips.Length == 0) yield break;
var currentClip = clips[0].clip;
var totalFrame = Mathf.RoundToInt(currentClip.frameRate * currentClip.length);
var split = s.Split(',');
for (int i = 0; i < split.Length - 1; i++)
dic_frame.Add(int.Parse(split[i]), false);
var valueperframe = float.Parse(split[split.Length - 1]);
Set_Warp(transform.position + transform.forward * valueperframe); // 제일 처음 프레임은 실행하고 시작
float t = 0f;
int prevFrame = 0;
while (!dic_frame[dic_frame.Keys.Max()])
{
var curState = m_animation.GetCurrentAnimatorStateInfo(0);
var curFrame = (int)(curState.normalizedTime * totalFrame);
// 놓친 프레임을 보완하기 위한 체크
for (int frame = prevFrame + 1; frame <= curFrame; frame++)
{
if (dic_frame.ContainsKey(frame) && !dic_frame[frame] && m_NavMeshAgent.isOnNavMesh && !IsOnlyDead())
{
dic_frame[frame] = true;
//Set_Move(transform.position + transform.forward * valueperframe);
//Set_Warp(transform.position + transform.forward * valueperframe);
m_NavMeshAgent.Move(transform.forward * valueperframe);
}
}
prevFrame = curFrame;
yield return null;
t += Time.deltaTime;
if (t >= curState.length)
break;
}
}
public override void Dodge(int a)
{
base.Dodge(a);
m_bCanDodge = a > 0;
//Debug.Log($"m_bCanDodge : {m_bCanDodge}");
}
public override void Immortal(int a)
{
base.Immortal(a);
m_bImmortal = a > 0;
//Debug.Log($"m_bImmortal : {m_bImmortal}");
}
}