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.
70 lines
2.4 KiB
C#
70 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Wizard.Battle.View;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class BattlePlayerVfxCreatorBase : IBattlePlayerVfxCreator
|
|
{
|
|
private readonly IBattlePlayerView m_battleView;
|
|
|
|
public BattlePlayerVfxCreatorBase(IBattlePlayerView battleView)
|
|
{
|
|
m_battleView = battleView;
|
|
}
|
|
|
|
public VfxBase CreateUsePp(int pp, int maxPp, Vector3 labelPosition, bool newReplayMoveTurn)
|
|
{
|
|
if (newReplayMoveTurn)
|
|
{
|
|
return ParallelVfxPlayer.Create(InstantVfx.Create(delegate
|
|
{
|
|
m_battleView.StatusParentPanel.GetComponent<IStatusPanelControl>().SetPp(pp, maxPp, newReplayMoveTurn);
|
|
}));
|
|
}
|
|
return ParallelVfxPlayer.Create(new LoadAndPlayEffectVfx("cmn_ui_cost_1", null, labelPosition, 0f), InstantVfx.Create(delegate
|
|
{
|
|
m_battleView.StatusParentPanel.GetComponent<IStatusPanelControl>().SetPp(pp, maxPp, newReplayMoveTurn);
|
|
}));
|
|
}
|
|
|
|
public VfxBase CreateUseBp(int bp, int deltaBp, Func<Vector3> getPosition, bool isVariableCost, bool isSelf)
|
|
{
|
|
if (BattleManagerBase.GetIns().IsRecovery || isVariableCost)
|
|
{
|
|
return ParallelVfxPlayer.Create(m_battleView.SetBp(bp));
|
|
}
|
|
string fileName = ((deltaBp < 0) ? "cmn_ui_hbp_2" : "cmn_ui_hbp_1");
|
|
if (deltaBp < 0 && isSelf)
|
|
{
|
|
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_HBP_UP);
|
|
}
|
|
return ParallelVfxPlayer.Create(new LoadAndPlayEffectVfx(fileName, null, getPosition, 0f, BattleManagerBase.GetIns().Battle3DContainer.layer), m_battleView.SetBp(bp));
|
|
}
|
|
|
|
public VfxBase CreateUpdateEp(int evolCount, int evolveWaitTurnCount)
|
|
{
|
|
return new UpdateEpVfx(m_battleView, evolCount, evolveWaitTurnCount);
|
|
}
|
|
|
|
public VfxBase CreateCardDraw(IEnumerable<BattleCardBase> cards, bool isOpenDrawSkill)
|
|
{
|
|
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
|
foreach (BattleCardBase card in cards)
|
|
{
|
|
if (card.BaseCost != card.Cost)
|
|
{
|
|
List<int> costList = card.BattleCardView.GetUseCostList(card.Cost);
|
|
bool isInHand = card.IsInHand;
|
|
sequentialVfxPlayer.Register(InstantVfx.Create(delegate
|
|
{
|
|
card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isInHand);
|
|
}));
|
|
}
|
|
}
|
|
sequentialVfxPlayer.Register(new PlayerDrawCardVfx(cards, isOpenDrawSkill));
|
|
sequentialVfxPlayer.Register(new PlayerEndDrawVfx(cards));
|
|
return sequentialVfxPlayer;
|
|
}
|
|
}
|