备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
using asap.core;
using cfg;
using game;
using System.Collections.Generic;
using UnityEngine;
public class MMTService
{
[Inject]
public Tables _tables { set; get; }
public int MMTValue { private set; get; }
public string MMTStr { private set; get; }
public List<int> FixedFish
{
get
{
return _tables.TbGlobalConfig.FixedFish;
}
}
public bool CanShowHand { set; get; } = true;
public bool mmt = false;
public bool mmc = false;
public bool mmBuilding = false;
public string Init(int MMTValue)
{
this.MMTValue = MMTValue;
var mmDatas = _tables.TbMMTInit.DataList;
string MMType = "";
mmt = false;
mmc = false;
for (int i = 0; i < mmDatas.Count; i++)
{
MMTInit data = mmDatas[i];
//B组修改
bool isB = false;
#if UNITY_ANDROID
if (CheckMMT(data.ID - 1))
{
isB = true;
switch (data.MMTType)
{
///IOS 不做MMTest
case "MMBeginnerPack":
mmt = true;
break;
case "MMCollectingTargetPack":
mmc = true;
break;
case "MMBuildingType":
mmBuilding = true;
break;
default:
break;
}
}
#endif
if (isB)
{
MMType = MMType + "B";
}
else
{
MMType = MMType + "A";
}
}
MMTStr = MMType;
return MMType;
}
/// <summary>
/// 检查分组
/// </summary>
/// <param name="index">第几大组012</param>
/// <returns>false=A true=B </returns>
bool CheckMMT(int index)
{
int ab = 1 << (index % 3);
return (MMTValue & ab) == ab;
}
}