feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files + UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
This commit is contained in:
58
SVSim.BattleEngine/Engine/Wizard/TournamentWatch.cs
Normal file
58
SVSim.BattleEngine/Engine/Wizard/TournamentWatch.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Wizard.RoomMatch;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class TournamentWatch : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UIButton _watchButton;
|
||||
|
||||
[SerializeField]
|
||||
private UIPanel _panel;
|
||||
|
||||
[SerializeField]
|
||||
private BoxCollider _collider;
|
||||
|
||||
private Transform _cellTransform0;
|
||||
|
||||
private Transform _cellTransform1;
|
||||
|
||||
private BattleParameter _battleParameter;
|
||||
|
||||
public TournamentWatchData Data { get; private set; }
|
||||
|
||||
public void Setup(TournamentWatchData data, List<TournamentCell> roundCells, GatheringInfo info)
|
||||
{
|
||||
Data = data;
|
||||
_cellTransform0 = roundCells.FirstOrDefault((TournamentCell c) => c.Data.ViewerId == data.ViewerId0).transform;
|
||||
_cellTransform1 = roundCells.FirstOrDefault((TournamentCell c) => c.Data.ViewerId == data.ViewerId1).transform;
|
||||
_watchButton.onClick.Add(new EventDelegate(Watch));
|
||||
_battleParameter = info.Rule.BattleParameterInstance;
|
||||
}
|
||||
|
||||
public void SetEnable(bool isEnabled)
|
||||
{
|
||||
_collider.enabled = isEnabled;
|
||||
}
|
||||
|
||||
public void SetAlpha(float alpha)
|
||||
{
|
||||
_panel.alpha = alpha;
|
||||
}
|
||||
|
||||
public void UpdatePosition()
|
||||
{
|
||||
base.transform.localPosition = (_cellTransform0.localPosition + _cellTransform1.localPosition) * 0.5f;
|
||||
}
|
||||
|
||||
public void Watch()
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
||||
RoomConnectController.InitializeParameter initializeParameter = new RoomConnectController.InitializeParameter(RoomConnectController.PositionMode.WATCHER, _battleParameter, Data.RoomId.ToString());
|
||||
initializeParameter.IsGathering = true;
|
||||
UIManager.GetInstance().StartCoroutine(GatheringUtility.JoinRoom(initializeParameter, ""));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user