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:
122
SVSim.BattleEngine/Engine/WatchTouchControl.cs
Normal file
122
SVSim.BattleEngine/Engine/WatchTouchControl.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.Touch;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class WatchTouchControl : NetworkTouchControl
|
||||
{
|
||||
private const float IDLE_TIME = 20f;
|
||||
|
||||
private const int IDLE_EMOTE_KIND = 3;
|
||||
|
||||
private Coroutine idleTimeCoroutine;
|
||||
|
||||
private ClassCharaPrm.EmotionType _previousEmotionType;
|
||||
|
||||
public new bool notAttackFlag { private get; set; }
|
||||
|
||||
public new bool notEmoteFlag { private get; set; }
|
||||
|
||||
public new bool notDragPlayCardFlag { private get; set; }
|
||||
|
||||
public new bool notEvolCardFlag { private get; set; }
|
||||
|
||||
public WatchTouchControl(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround)
|
||||
: base(battleMgr, battleCamera, backGround)
|
||||
{
|
||||
notAttackFlag = true;
|
||||
notEmoteFlag = true;
|
||||
notDragPlayCardFlag = true;
|
||||
notEvolCardFlag = true;
|
||||
}
|
||||
|
||||
protected override bool IsFeasibleAttack()
|
||||
{
|
||||
if (notAttackFlag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.IsFeasibleAttack();
|
||||
}
|
||||
|
||||
protected override bool IsFeasibleEmote()
|
||||
{
|
||||
if (notEmoteFlag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.IsFeasibleEmote();
|
||||
}
|
||||
|
||||
protected override bool IsFeasiblePlayCard()
|
||||
{
|
||||
if (notDragPlayCardFlag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.IsFeasiblePlayCard();
|
||||
}
|
||||
|
||||
protected override bool IsFeasibleEvol()
|
||||
{
|
||||
if (notEvolCardFlag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return base.IsFeasibleEvol();
|
||||
}
|
||||
|
||||
protected override void StopDraggingArrow()
|
||||
{
|
||||
}
|
||||
|
||||
protected override BattleCardBase GetHitCardFromRayCastHit(RaycastHit hit)
|
||||
{
|
||||
GameObject cardRootGameObject = hit.collider.gameObject.transform.parent.gameObject;
|
||||
BattleCardBase battleCardBase = base.BattlePlayer.FindCardFromGameObject(cardRootGameObject);
|
||||
if (battleCardBase != null)
|
||||
{
|
||||
return battleCardBase;
|
||||
}
|
||||
battleCardBase = base.BattlePlayer.BattleView.GetSelectCardList().FirstOrDefault((BattleCardBase s) => s.BattleCardView.GameObject == cardRootGameObject);
|
||||
if (battleCardBase != null)
|
||||
{
|
||||
return battleCardBase;
|
||||
}
|
||||
BattleCardBase battleCardBase2 = base.BattleEnemy.FindCardFromGameObject(cardRootGameObject);
|
||||
if (battleCardBase2 != null)
|
||||
{
|
||||
return battleCardBase2;
|
||||
}
|
||||
battleCardBase2 = base.BattleEnemy.BattleView.GetSelectCardList().FirstOrDefault((BattleCardBase s) => s.BattleCardView.GameObject == cardRootGameObject);
|
||||
if (battleCardBase2 != null)
|
||||
{
|
||||
return battleCardBase2;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void WatchChoiceDetail(BattleCardBase hitCard, ParallelVfxPlayer parallelVfx)
|
||||
{
|
||||
if (hitCard != null && !hitCard.IsInHand && !hitCard.IsInDeck && !hitCard.IsInplay && !hitCard.IsDead)
|
||||
{
|
||||
_hitCard = hitCard;
|
||||
SelectCardProcessor touchProcessor = new SelectCardProcessor(_battleMgr, _hitCard, _inputMgr, _pressedCard != null);
|
||||
parallelVfx.Register(RegisterTouchProcessor(touchProcessor));
|
||||
if (hitCard.BattleCardView.Transform.localScale.x >= 1f)
|
||||
{
|
||||
StartOpenHandDetail(_hitCard, right: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void HideAlert()
|
||||
{
|
||||
_alertCard = null;
|
||||
}
|
||||
|
||||
protected override bool IsShowingAlert()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user