备份CatanBuilding瘦身独立工程
This commit is contained in:
104
Assets/Scripts/MMT/TBAccountMM.cs
Normal file
104
Assets/Scripts/MMT/TBAccountMM.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using cfg;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class AccountMM
|
||||
{
|
||||
public AccountMM(Account account)
|
||||
{
|
||||
ID = account.ID;
|
||||
Rewards = account.Rewards;
|
||||
Icon = account.Icon;
|
||||
Img = account.Img;
|
||||
Title = account.Title;
|
||||
Title_l10n_key = account.Title_l10n_key;
|
||||
DisplaySwitch = account.DisplaySwitch;
|
||||
CashMag = account.CashMag;
|
||||
CashMagLimited = account.CashMagLimited;
|
||||
EnergyLimit = account.EnergyLimit;
|
||||
EnergyRecover = account.EnergyRecover;
|
||||
EventFishCashMag = account.EventFishCashMag;
|
||||
EventFishDamage = account.EventFishDamage;
|
||||
AquariumLimit = account.AquariumLimit;
|
||||
AquariumCashMag = account.AquariumCashMag;
|
||||
}
|
||||
public AccountMM(AccountMmt account)
|
||||
{
|
||||
ID = account.ID;
|
||||
Rewards = account.Rewards;
|
||||
Icon = account.Icon;
|
||||
Img = account.Img;
|
||||
Title = account.Title;
|
||||
Title_l10n_key = account.Title_l10n_key;
|
||||
DisplaySwitch = account.DisplaySwitch;
|
||||
CashMag = account.CashMag;
|
||||
CashMagLimited = account.CashMagLimited;
|
||||
EnergyLimit = account.EnergyLimit;
|
||||
EnergyRecover = account.EnergyRecover;
|
||||
EventFishCashMag = account.EventFishCashMag;
|
||||
EventFishDamage = account.EventFishDamage;
|
||||
AquariumLimit = account.AquariumLimit;
|
||||
AquariumCashMag = account.AquariumCashMag;
|
||||
}
|
||||
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// 对应Drop表主键
|
||||
/// </summary>
|
||||
public int Rewards { get; private set; }
|
||||
/// <summary>
|
||||
/// 图标名称<br/>Type=1的时候生效
|
||||
/// </summary>
|
||||
public string Icon { get; private set; }
|
||||
/// <summary>
|
||||
/// 大图
|
||||
/// </summary>
|
||||
public string Img { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string Title_l10n_key { get; }
|
||||
/// <summary>
|
||||
/// 若本级有权益投放,对应权益显示为1
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<int> DisplaySwitch { get; private set; }
|
||||
/// <summary>
|
||||
/// 填等级,具体数值读benefits
|
||||
/// </summary>
|
||||
public int CashMag { get; private set; }
|
||||
public int CashMagLimited { get; private set; }
|
||||
public int EnergyLimit { get; private set; }
|
||||
public int EnergyRecover { get; private set; }
|
||||
public int EventFishCashMag { get; private set; }
|
||||
public int EventFishDamage { get; private set; }
|
||||
public int AquariumLimit { get; private set; }
|
||||
public int AquariumCashMag { get; private set; }
|
||||
}
|
||||
|
||||
public class TBAccountMM
|
||||
{
|
||||
public TBAccountMM(List<AccountMmt> DataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, AccountMM>();
|
||||
_dataList = new List<AccountMM>();
|
||||
for (int i = 0; DataList != null && i < DataList.Count; i++)
|
||||
{
|
||||
var accountMM = new AccountMM(DataList[i]);
|
||||
_dataList.Add(accountMM);
|
||||
_dataMap.Add(accountMM.ID, accountMM);
|
||||
}
|
||||
}
|
||||
public TBAccountMM(List<Account> DataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, AccountMM>();
|
||||
_dataList = new List<AccountMM>();
|
||||
for (int i = 0; DataList != null && i < DataList.Count; i++)
|
||||
{
|
||||
var accountMM = new AccountMM(DataList[i]);
|
||||
_dataList.Add(accountMM);
|
||||
_dataMap.Add(accountMM.ID, accountMM);
|
||||
}
|
||||
}
|
||||
private readonly Dictionary<int, AccountMM> _dataMap;
|
||||
private readonly List<AccountMM> _dataList;
|
||||
public List<AccountMM> DataList => _dataList;
|
||||
|
||||
public AccountMM GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
}
|
||||
11
Assets/Scripts/MMT/TBAccountMM.cs.meta
Normal file
11
Assets/Scripts/MMT/TBAccountMM.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fdfb74a815ca2b438b460df9d5a9918
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
99
Assets/Scripts/MMT/TBAreaMM.cs
Normal file
99
Assets/Scripts/MMT/TBAreaMM.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using cfg;
|
||||
using System.Collections.Generic;
|
||||
public class AreaMM
|
||||
{
|
||||
public AreaMM(AreaMmt area)
|
||||
{
|
||||
ID = area.ID;
|
||||
TimelineID = area.TimelineID;
|
||||
StepCount = area.StepCount;
|
||||
BuildingPrefeb = area.BuildingPrefeb;
|
||||
TimelinePlaytime = area.TimelinePlaytime;
|
||||
Name_l10n_key = area.Name_l10n_key;
|
||||
NameIndex_l10n_key = area.NameIndex_l10n_key;
|
||||
Icon = area.Icon;
|
||||
Reward = area.Reward;
|
||||
StepList = area.StepList;
|
||||
PhotoSwitch = area.PhotoSwitch;
|
||||
TurnOffFreeLook = area.TurnOffFreeLook;
|
||||
TurnOffTimeScale = area.TurnOffTimeScale;
|
||||
}
|
||||
|
||||
public AreaMM(ConstructionArea area)
|
||||
{
|
||||
ID = area.ID;
|
||||
TimelineID = area.TimelineID;
|
||||
StepCount = area.StepCount;
|
||||
BuildingPrefeb = area.BuildingPrefeb;
|
||||
TimelinePlaytime = area.TimelinePlaytime;
|
||||
Name_l10n_key = area.Name_l10n_key;
|
||||
NameIndex_l10n_key = area.NameIndex_l10n_key;
|
||||
Icon = area.Icon;
|
||||
Reward = area.Reward;
|
||||
StepList = area.StepList;
|
||||
TurnOffFreeLook = area.TurnOffFreeLook;
|
||||
TurnOffTimeScale = area.TurnOffTimeScale;
|
||||
}
|
||||
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// Building脚本中的序号,从0开始
|
||||
/// </summary>
|
||||
public int TimelineID { get; private set; }
|
||||
public int StepCount { get; private set; }
|
||||
public string BuildingPrefeb { get; private set; }
|
||||
/// <summary>
|
||||
/// 不同prefeb转换的时候,上一个timeline播放时间
|
||||
/// </summary>
|
||||
public float TimelinePlaytime { get; private set; }
|
||||
|
||||
public string Name_l10n_key { get; }
|
||||
|
||||
public string NameIndex_l10n_key { get; }
|
||||
public string Icon { get; private set; }
|
||||
/// <summary>
|
||||
/// 对应Drop表主键
|
||||
/// </summary>
|
||||
public int Reward { get; private set; }
|
||||
public System.Collections.Generic.List<int> StepList { get; private set; }
|
||||
public string PhotoSwitch { get; private set; }
|
||||
/// <summary>
|
||||
/// 用于室内关闭lookfar和looknear功能<br/>1 关闭
|
||||
/// </summary>
|
||||
public int TurnOffFreeLook { get; private set; }
|
||||
/// <summary>
|
||||
/// 用于室内关闭加速功能<br/>1 关闭
|
||||
/// </summary>
|
||||
public int TurnOffTimeScale { get; private set; }
|
||||
}
|
||||
public class TBAreaMM
|
||||
{
|
||||
public TBAreaMM(List<AreaMmt> DataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, AreaMM>();
|
||||
_dataList = new List<AreaMM>();
|
||||
for (int i = 0; DataList != null && i < DataList.Count; i++)
|
||||
{
|
||||
var accountMM = new AreaMM(DataList[i]);
|
||||
_dataList.Add(accountMM);
|
||||
_dataMap.Add(accountMM.ID, accountMM);
|
||||
}
|
||||
}
|
||||
public TBAreaMM(List<ConstructionArea> DataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, AreaMM>();
|
||||
_dataList = new List<AreaMM>();
|
||||
for (int i = 0; DataList != null && i < DataList.Count; i++)
|
||||
{
|
||||
var accountMM = new AreaMM(DataList[i]);
|
||||
_dataList.Add(accountMM);
|
||||
_dataMap.Add(accountMM.ID, accountMM);
|
||||
}
|
||||
}
|
||||
private readonly Dictionary<int, AreaMM> _dataMap;
|
||||
private readonly List<AreaMM> _dataList;
|
||||
public List<AreaMM> DataList => _dataList;
|
||||
public Dictionary<int, AreaMM> DataMap => _dataMap;
|
||||
|
||||
public AreaMM GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
}
|
||||
11
Assets/Scripts/MMT/TBAreaMM.cs.meta
Normal file
11
Assets/Scripts/MMT/TBAreaMM.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd7b20adf459d8041a65e927097054db
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
61
Assets/Scripts/MMT/TBBenefitsMM.cs
Normal file
61
Assets/Scripts/MMT/TBBenefitsMM.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using cfg;
|
||||
using System.Collections.Generic;
|
||||
public class BenefitsMM
|
||||
{
|
||||
public BenefitsMM(Benefits benefits)
|
||||
{
|
||||
Id = benefits.Id;
|
||||
AccountLevel = benefits.AccountLevel;
|
||||
BenefitsValue = benefits.BenefitsValue;
|
||||
}
|
||||
|
||||
|
||||
public BenefitsMM(BenefitsMmt benefits)
|
||||
{
|
||||
Id = benefits.Id;
|
||||
AccountLevel = benefits.AccountLevel;
|
||||
BenefitsValue = benefits.BenefitsValue;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// id与item表中的类型对应
|
||||
/// </summary>
|
||||
public int Id { get; private set; }
|
||||
public System.Collections.Generic.List<int> AccountLevel { get; private set; }
|
||||
public System.Collections.Generic.List<float> BenefitsValue { get; private set; }
|
||||
|
||||
}
|
||||
public class TBBenefitsMM
|
||||
{
|
||||
private readonly Dictionary<int, BenefitsMM> _dataMap;
|
||||
private readonly List<BenefitsMM> _dataList;
|
||||
|
||||
public TBBenefitsMM(List<Benefits> dataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, BenefitsMM>();
|
||||
_dataList = new List<BenefitsMM>();
|
||||
foreach (var benefits in dataList)
|
||||
{
|
||||
var v = new BenefitsMM(benefits);
|
||||
_dataList.Add(v);
|
||||
_dataMap.Add(v.Id, v);
|
||||
}
|
||||
}
|
||||
public TBBenefitsMM(List<BenefitsMmt> dataList)
|
||||
{
|
||||
_dataMap = new Dictionary<int, BenefitsMM>();
|
||||
_dataList = new List<BenefitsMM>();
|
||||
foreach (var benefits in dataList)
|
||||
{
|
||||
var v = new BenefitsMM(benefits);
|
||||
_dataList.Add(v);
|
||||
_dataMap.Add(v.Id, v);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<int, BenefitsMM> DataMap => _dataMap;
|
||||
public List<BenefitsMM> DataList => _dataList;
|
||||
|
||||
public BenefitsMM GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
}
|
||||
11
Assets/Scripts/MMT/TBBenefitsMM.cs.meta
Normal file
11
Assets/Scripts/MMT/TBBenefitsMM.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c957d91d7c09a246a09eceafae8d3ad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
76
Assets/Scripts/MMT/TBStepMM.cs
Normal file
76
Assets/Scripts/MMT/TBStepMM.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using cfg;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class StepMM
|
||||
{
|
||||
public StepMM(StepMmt stepMmt)
|
||||
{
|
||||
ID = stepMmt.ID;
|
||||
StartTime = stepMmt.StartTime;
|
||||
PlayTime = stepMmt.PlayTime;
|
||||
BuildRequired = stepMmt.BuildRequired;
|
||||
FixRequired = stepMmt.FixRequired;
|
||||
}
|
||||
public StepMM(ConstructionStep constructionStep)
|
||||
{
|
||||
ID = constructionStep.ID;
|
||||
StartTime = constructionStep.StartTime;
|
||||
PlayTime = constructionStep.PlayTime;
|
||||
BuildRequired = constructionStep.BuildRequired;
|
||||
FixRequired = constructionStep.FixRequired;
|
||||
}
|
||||
public int ID { get; private set; }
|
||||
/// <summary>
|
||||
/// timeline中时间
|
||||
/// </summary>
|
||||
public float StartTime { get; private set; }
|
||||
/// <summary>
|
||||
/// 动画播放时间
|
||||
/// </summary>
|
||||
public float PlayTime { get; private set; }
|
||||
/// <summary>
|
||||
/// 建造所需钞票
|
||||
/// </summary>
|
||||
public int BuildRequired { get; private set; }
|
||||
/// <summary>
|
||||
/// 修复所需钞票
|
||||
/// </summary>
|
||||
public int FixRequired { get; private set; }
|
||||
}
|
||||
|
||||
public class TBStepMM
|
||||
{
|
||||
private readonly Dictionary<int, StepMM> _dataMap;
|
||||
private readonly List<StepMM> _dataList;
|
||||
|
||||
public TBStepMM(List<StepMmt> stepMmts)
|
||||
{
|
||||
_dataMap = new Dictionary<int, StepMM>();
|
||||
_dataList = new List<StepMM>();
|
||||
|
||||
foreach (var stepMmt in stepMmts)
|
||||
{
|
||||
var stepMM = new StepMM(stepMmt);
|
||||
_dataList.Add(stepMM);
|
||||
_dataMap.Add(stepMM.ID, stepMM);
|
||||
}
|
||||
}
|
||||
|
||||
public TBStepMM(List<ConstructionStep> constructionSteps)
|
||||
{
|
||||
_dataMap = new Dictionary<int, StepMM>();
|
||||
_dataList = new List<StepMM>();
|
||||
|
||||
foreach (var constructionStep in constructionSteps)
|
||||
{
|
||||
var stepMM = new StepMM(constructionStep);
|
||||
_dataList.Add(stepMM);
|
||||
_dataMap.Add(stepMM.ID, stepMM);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<int, StepMM> DataMap => _dataMap;
|
||||
public List<StepMM> DataList => _dataList;
|
||||
|
||||
public StepMM GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
}
|
||||
11
Assets/Scripts/MMT/TBStepMM.cs.meta
Normal file
11
Assets/Scripts/MMT/TBStepMM.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 797bde61624f51a4b93c0d5f59522d35
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
105
Assets/Scripts/MMT/TablesMMT.cs
Normal file
105
Assets/Scripts/MMT/TablesMMT.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using asap.core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Unity.SharpZipLib.Zip;
|
||||
using System.Net;
|
||||
using UnityEngine.Networking;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
public sealed partial class Tables
|
||||
{
|
||||
|
||||
TBAccountMM _TBAccountMM;
|
||||
public TBAccountMM TBAccount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_TBAccountMM == null)
|
||||
{
|
||||
MMTService mMTService = GContext.container.Resolve<MMTService>();
|
||||
if (mMTService.mmBuilding)
|
||||
{
|
||||
_TBAccountMM = new TBAccountMM(TbAccountMmt.DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
_TBAccountMM = new TBAccountMM(TbAccount.DataList);
|
||||
}
|
||||
}
|
||||
return _TBAccountMM;
|
||||
}
|
||||
}
|
||||
TBBenefitsMM _TBBenefitsMM;
|
||||
public TBBenefitsMM TBBenefits
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_TBBenefitsMM == null)
|
||||
{
|
||||
MMTService mMTService = GContext.container.Resolve<MMTService>();
|
||||
if (mMTService.mmBuilding)
|
||||
{
|
||||
_TBBenefitsMM = new TBBenefitsMM(TbBenefitsMmt.DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
_TBBenefitsMM = new TBBenefitsMM(TbBenefits.DataList);
|
||||
}
|
||||
}
|
||||
return _TBBenefitsMM;
|
||||
}
|
||||
}
|
||||
|
||||
TBAreaMM _TBAreaMM;
|
||||
public TBAreaMM TBArea
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_TBAreaMM == null)
|
||||
{
|
||||
MMTService mMTService = GContext.container.Resolve<MMTService>();
|
||||
if (mMTService.mmBuilding)
|
||||
{
|
||||
_TBAreaMM = new TBAreaMM(TbAreaMmt.DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
_TBAreaMM = new TBAreaMM(TbConstructionArea.DataList);
|
||||
}
|
||||
}
|
||||
return _TBAreaMM;
|
||||
}
|
||||
}
|
||||
TBStepMM _TBStepMM;
|
||||
public TBStepMM TBStep
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_TBStepMM == null)
|
||||
{
|
||||
MMTService mMTService = GContext.container.Resolve<MMTService>();
|
||||
if (mMTService.mmBuilding)
|
||||
{
|
||||
_TBStepMM = new TBStepMM(TbStepMmt.DataList);
|
||||
}
|
||||
else
|
||||
{
|
||||
_TBStepMM = new TBStepMM(TbConstructionStep.DataList);
|
||||
}
|
||||
}
|
||||
return _TBStepMM;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/MMT/TablesMMT.cs.meta
Normal file
11
Assets/Scripts/MMT/TablesMMT.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a48481ff453528499bd202f82cb93e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user