port(m1): wave 7f — VFX containers / Create factories / dropped event / ctor cascade (112->88)
- VFX: SequentialVfxPlayer.GetAllVfxAsList, ParallelVfxPlayer.GetVfxList, VfxMgr.CheckAndAddEffectVfxList; point our own ShowBattleUIImmediatelyVfx stub at NullVfx.GetInstance() (it called a non-existent NullVfx.Create). - Static factories: SkillTargetSelectTouchProcessor.Create (10-arg), DialogReportToManagement.Create(long). - Re-add StartSkillSelectVfx.OnStart event (m1_stub_gen drops `event` decls — the recurring session-6 gap; generator event-capture fix still pending). - Stop the BattleCardView/GameObjMgr ctor cascade: parameterless ctors on the no-op BattleCardView and GameObjMgr hand shims so non-chaining subclass/field stubs satisfy their implicit base() call. - Copy Cute/ListExtensions.cs (FisherYatesShuffle extension) verbatim into Engine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,7 @@ Cute.Payment/StringExtensions.cs Cute.Payment/StringExtensions.cs 3d0f43fd0995ee
|
||||
Cute.Payment\IPaymentCommonCallback.cs Cute.Payment\IPaymentCommonCallback.cs 21466450f2d87e33a5d8e8d681832bb230cc75547384d5cd69120e439235ebdf 0
|
||||
Cute/EventExtension.cs Cute/EventExtension.cs abe1b8be9d01d8ad88901cdccf387563ae14282dd4e02b3fc1e1e7a872526f0c 0
|
||||
Cute/IEnumerableExtensions.cs Cute/IEnumerableExtensions.cs 6238351f85ebcc14e0cebfd1c1cc57162baf997d9e1b8de25a4316a41c9ff74b 0
|
||||
Cute/ListExtensions.cs Cute/ListExtensions.cs c468ed8de843ce7b032408876459a643497efba94450c861146c6b6b2b2c6101 0
|
||||
Cute\AchievementManager.cs Cute\AchievementManager.cs ef74efb238feff1a14f3bc70c612b4faab3e5546612c2b21324998ae72d37091 0
|
||||
Cute\AdjustManager.cs Cute\AdjustManager.cs 670477cb0f0b5e7d8c4940a6b826a57c037b8392a58caf242a0219160461c485 0
|
||||
Cute\AssetBundleObject.cs Cute\AssetBundleObject.cs 8bb313efedc9c4ceea5ecc22768952299393dfa30e532c9d411e48f622929d2e 0
|
||||
|
||||
|
18
SVSim.BattleEngine/Engine/Cute/ListExtensions.cs
Normal file
18
SVSim.BattleEngine/Engine/Cute/ListExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public static class ListExtensions
|
||||
{
|
||||
public static void FisherYatesShuffle<T>(this List<T> listToShuffle)
|
||||
{
|
||||
for (int num = listToShuffle.Count - 1; num > 0; num--)
|
||||
{
|
||||
int index = Random.Range(0, num + 1);
|
||||
T value = listToShuffle[index];
|
||||
listToShuffle[index] = listToShuffle[num];
|
||||
listToShuffle[num] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace Wizard.Battle.UI
|
||||
|
||||
namespace Wizard.UI.ReportToManagement
|
||||
{
|
||||
public partial class DialogReportToManagement { }
|
||||
public partial class DialogReportToManagement { public static DialogBase Create(long battleId = -1L) => default!; }
|
||||
}
|
||||
|
||||
namespace Wizard.Dialog.Setting
|
||||
|
||||
@@ -74,7 +74,7 @@ public class EffectMgr
|
||||
public static TargetType ToStrTargetType(string str) => TargetType.NONE;
|
||||
}
|
||||
|
||||
public partial class GameObjMgr { }
|
||||
public partial class GameObjMgr { public GameObjMgr() { } }
|
||||
|
||||
public class GameMgr
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Wizard.Battle.View.Vfx
|
||||
public abstract void RegisterOpeningVfx(ClassBattleCardBase playerClass, ClassBattleCardBase enemyClass);
|
||||
|
||||
public static string OpenningLogStep = "";
|
||||
public static VfxBase ShowBattleUIImmediatelyVfx(BattlePlayerBase battlePlayerBase, bool fixDirection = false, bool isNewReplay = false, bool isBanmenkun = false) => NullVfx.Create();
|
||||
public static VfxBase ShowBattleUIImmediatelyVfx(BattlePlayerBase battlePlayerBase, bool fixDirection = false, bool isNewReplay = false, bool isBanmenkun = false) => NullVfx.GetInstance();
|
||||
|
||||
public class WaitVoiceEndVfx : VfxBase { }
|
||||
public class OpeningShowCharacterPanelVfx : SequentialVfxPlayer { }
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Wizard.Battle.Touch
|
||||
// Empty hand stubs: supply the four ITouchProcessor members as no-ops.
|
||||
public partial class SkillTargetSelectTouchProcessor : ITouchProcessor
|
||||
{
|
||||
public static SkillTargetSelectTouchProcessor Create(BattleManagerBase battleMgr, BattleCardBase actCard, List<SkillBase> selectSkills, Prediction prediction, List<BattleCardBase> selectCards, bool isEvolve, bool isChoiceBrave, BattleCardBase transformCard = null, Action onCompleteLastProcess = null, Action onCancelLastProcess = null) => default!;
|
||||
public VfxBase Start() => NullVfx.GetInstance();
|
||||
public VfxBase Update(float dt, Camera camera) => NullVfx.GetInstance();
|
||||
public VfxWith<ITouchProcessor> End() => default!;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace Wizard.Battle.View.Vfx
|
||||
{ var p = new SequentialVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; }
|
||||
public void Register(VfxBase vfx) { if (vfx != null) _children.Add(vfx); }
|
||||
public int Count() => _children.Count;
|
||||
public List<VfxBase> GetAllVfxAsList() => new List<VfxBase>(_children);
|
||||
public override bool IsVfxNonEmpty()
|
||||
{
|
||||
foreach (var c in _children) { if (c != null && c.IsVfxNonEmpty()) return true; }
|
||||
@@ -70,6 +71,7 @@ namespace Wizard.Battle.View.Vfx
|
||||
{ var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; }
|
||||
public static ParallelVfxPlayer Create(params VfxBase[] vfxCollection)
|
||||
{ var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; }
|
||||
public List<VfxBase> GetVfxList() => new List<VfxBase>(_children);
|
||||
}
|
||||
|
||||
public class VfxWithLoading : SequentialVfxPlayer
|
||||
@@ -115,6 +117,10 @@ namespace Wizard.Battle.View.Vfx
|
||||
public VfxWith(VfxBase vfx, T1 value1, T2 value2) { Vfx = vfx; Value_1 = value1; Value_2 = value2; }
|
||||
}
|
||||
|
||||
// m1_stub_gen drops `event` decls (session-6 gap) — re-add StartSkillSelectVfx.OnStart
|
||||
// that its generated stub lost. Re-check this if CS1061 on an event name recurs.
|
||||
public partial class StartSkillSelectVfx { public event System.Action OnStart; }
|
||||
|
||||
public class EvolveVfxBase : VfxBase { }
|
||||
public partial class CanNotTouchCardVfx : VfxBase { }
|
||||
|
||||
@@ -133,6 +139,7 @@ namespace Wizard.Battle.View.Vfx
|
||||
public virtual void RegisterSequentialVfx<T>(T vfx) where T : VfxBase { }
|
||||
public Queue<VfxBase> GetSequentialVfxQueues() => new Queue<VfxBase>();
|
||||
public List<VfxBase> GetVfxList<TType>() => new List<VfxBase>();
|
||||
public static void CheckAndAddEffectVfxList(VfxBase vfx, List<IEffectVfx> effectVfxList) { }
|
||||
public virtual void Update(float dt) { }
|
||||
public virtual void Cancel() { }
|
||||
public void Dispose() { }
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace Wizard.Battle.View
|
||||
public partial class BattleCardView
|
||||
{
|
||||
// BuildInfo (14-arg ctor + members) provided by Generated/BattleCardView_BuildInfo.g.cs
|
||||
// Parameterless ctor lets the no-op subclass hand stubs (ClassBattleCardViewBase,
|
||||
// NullBattleCardView) and any non-chaining stub satisfy their implicit base() call.
|
||||
public BattleCardView() { }
|
||||
public BattleCardView(BuildInfo buildInfo) { }
|
||||
// AttackTargetSelectInfo provided by Generated/BattleCardView_AttackTargetSelectInfo.g.cs
|
||||
public virtual UnityEngine.GameObject GameObject { get; protected set; }
|
||||
|
||||
Reference in New Issue
Block a user