27 lines
1.9 KiB
C#
27 lines
1.9 KiB
C#
// WL791_Mode.cs — Play 중 attackMoveMode 를 잠시 바꿔 A/B 실측 (메모리만 · 반드시 원래 값(2=FrameTable)으로 되돌린 뒤 Play 종료)
|
|
// unity command run_script --file AgentScripts/WL791_Mode.cs --entry WL791_Mode.Set --args '[0]' (0 FixedStep · 1 ClipRootMotion · 2 FrameTable)
|
|
// unity command run_script --file AgentScripts/WL791_Mode.cs --entry WL791_Mode.Show
|
|
using UnityEngine;
|
|
|
|
public static class WL791_Mode
|
|
{
|
|
public static object Set(int mode)
|
|
{
|
|
if (!Application.isPlaying) return "not playing";
|
|
var cfg = WL.Combat.WLCombatMotionSettings.Instance; if (cfg == null) return "settings null";
|
|
cfg.attackMoveMode = (WL.Combat.AttackMoveMode)mode;
|
|
var pc = Object.FindObjectsByType<MyActor>(FindObjectsInactive.Exclude, FindObjectsSortMode.None).Length > 0
|
|
? Object.FindObjectsByType<MyActor>(FindObjectsInactive.Exclude, FindObjectsSortMode.None)[0] as PCActor : null;
|
|
if (pc != null) WL.Combat.AttackRootMotion.Ensure(pc);
|
|
return "attackMoveMode=" + cfg.attackMoveMode + " applyRootMotion=" + (pc != null && pc.m_animation != null ? pc.m_animation.applyRootMotion.ToString() : "?");
|
|
}
|
|
public static object Show()
|
|
{
|
|
var cfg = WL.Combat.WLCombatMotionSettings.Instance; if (cfg == null) return "settings null";
|
|
var sb = new System.Text.StringBuilder();
|
|
sb.Append("mode=" + cfg.attackMoveMode + " scale=" + cfg.frameTableScale + " dashMax=" + cfg.dashMaxDistance + " dashMinBeyond=" + cfg.dashMinBeyondReach + " blockInReach=" + cfg.dashBlockIfEnemyInReach + " tables=" + (cfg.attackFrameTables != null ? cfg.attackFrameTables.Count : 0));
|
|
if (cfg.attackFrameTables != null) foreach (var t in cfg.attackFrameTables) sb.Append(" | " + t.clipContains + " total=" + t.Total() + "cm frames=" + t.frames.Length);
|
|
return sb.ToString();
|
|
}
|
|
}
|