feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
This commit is contained in:
75
SVSim.BattleEngine/Engine/Skill_special_win.cs
Normal file
75
SVSim.BattleEngine/Engine/Skill_special_win.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Wizard;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class Skill_special_win : SkillBase
|
||||
{
|
||||
private const int SHAKE_SCREEN_MAX_VALUE = 10;
|
||||
|
||||
private const float SHAKE_CAMERA_VECTOR_VALUE = 0.02f;
|
||||
|
||||
private const float SHAKE_CAMERA_TIME_COEFFICIENT = 0.05f;
|
||||
|
||||
private const float SHAKE_CAMERA_TIME_OFFSET = 0.2f;
|
||||
|
||||
private const string OPTION_WHEN_SPECIAL_LOSE = "when_special_lose";
|
||||
|
||||
public Skill_special_win(SkillParameter skillPrm, string option)
|
||||
: base(skillPrm, option)
|
||||
{
|
||||
}
|
||||
|
||||
public override VfxWithLoading Start(CallParameter parameter)
|
||||
{
|
||||
if (BattleManagerBase.IsForecast)
|
||||
{
|
||||
return NullVfxWithLoading.GetInstance();
|
||||
}
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
IEnumerable<BattleCardBase> targetCards = parameter.targetCards;
|
||||
bool flag = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.invalid_ability, "_OPT_NULL_") == "when_special_lose";
|
||||
foreach (BattleCardBase targetCard in parameter.targetCards)
|
||||
{
|
||||
BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(targetCard.OpponentBattlePlayer, targetCard.SelfBattlePlayer);
|
||||
SkillProcessor.ProcessInfo processInfo = targetCard.OpponentBattlePlayer.Class.Skills.CreateWhenSpecialLose(parameter.skillProcessor, playerInfoPair);
|
||||
if (processInfo != null && !flag)
|
||||
{
|
||||
parameter.skillProcessor.Register(processInfo);
|
||||
if (!BattleManagerBase.GetIns().IsRecovery)
|
||||
{
|
||||
BattleCardBase targetClass = targetCard.OpponentBattlePlayer.Class;
|
||||
sequentialVfxPlayer.Register(SkillBase.CreateSingleVfx(base.SkillPrm.resourceMgr, () => targetClass.BattleCardView.GameObject.transform.position, new List<BattleCardBase> { targetClass }, targetClass.IsPlayer, targetClass.BattleCardView, "btl_nerva_2", EffectMgr.EngineType.SHURIKEN, "se_btl_nerva_2", EffectMgr.MoveType.DIRECT_LEADER, EffectMgr.TargetType.SINGLE, 0f));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
targetCard.OpponentBattlePlayer.Class.FlagCardAsDestroyedBySkill();
|
||||
sequentialVfxPlayer.Register(targetCard.SelfBattlePlayer.BattleMgr.PlaySpecialWin(targetCard.SelfBattlePlayer));
|
||||
}
|
||||
}
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
foreach (BattleCardBase item in targetCards)
|
||||
{
|
||||
list.Add(item.OpponentBattlePlayer.Class);
|
||||
}
|
||||
VfxWithLoading vfxWithLoading = CreateSkillEffect(base.SkillPrm.resourceMgr, list);
|
||||
VfxBase vfxBase = SequentialVfxPlayer.Create(WaitVfx.Create(base.SkillPrm.buildInfo._effectTime), InstantVfx.Create(delegate
|
||||
{
|
||||
ShakeScreen();
|
||||
}));
|
||||
SetInductionVoiceIndex(isSpecialWin: true);
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(vfxWithLoading.MainVfx, CreateSkillActivationVoiceVfx(), vfxBase);
|
||||
VfxBase mainVfx = SequentialVfxPlayer.Create(parallelVfxPlayer, sequentialVfxPlayer);
|
||||
return VfxWithLoading.Create(vfxWithLoading.LoadingVfx, mainVfx);
|
||||
}
|
||||
|
||||
public static void ShakeScreen(int shakeScreenMinValue = 10)
|
||||
{
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
float num = Mathf.Min(10, shakeScreenMinValue);
|
||||
BattleCamera camera = ins.Camera;
|
||||
ins.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(camera.ShakeCamera(Vector3.one * (num * 0.02f), num * 0.05f + 0.2f, 0f), WaitVfx.Create(num * 0.05f + 0.2f), camera.ShakeComplete()));
|
||||
ins.BackGround.StartFieldShake();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user