65 lines
1.5 KiB
C#
65 lines
1.5 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description: AI 配置数据 (序列化)
|
|
* @Date: 2025年04月18日 星期五 15:04:06
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Logic.AI
|
|
{
|
|
public class AIConfigAsset : ScriptableObject
|
|
{
|
|
public float MoneyScore;
|
|
public float UnitScore;
|
|
public float CityScore;
|
|
|
|
public float CityDefendScore;
|
|
|
|
public float OneCanMoveGridMaxScore;
|
|
public float OneSightGridMaxScore;
|
|
|
|
public float UnitAttackScore;
|
|
public float UnitDefendScore;
|
|
public float UnitExploreScore;
|
|
|
|
public float UnitExploreCityCenterScore;
|
|
public float UnitExploreTreasureScore;
|
|
public float UnitExploreStarfishScore;
|
|
|
|
public float FutureScoreTransformValue;
|
|
|
|
public List<AICalculatorTechInfo> TechInfoList = new List<AICalculatorTechInfo>();
|
|
|
|
|
|
public AICalculatorTechInfo GetTechInfo(TechType techType)
|
|
{
|
|
foreach (var techInfo in TechInfoList)
|
|
{
|
|
if (techInfo.TechType != techType) continue;
|
|
return techInfo;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
[Serializable]
|
|
public class AICalculatorTechInfo
|
|
{
|
|
public TechType TechType;
|
|
public float Ratio;
|
|
|
|
public AICalculatorTechInfo(TechType techType, float ratio)
|
|
{
|
|
TechType = techType;
|
|
Ratio = ratio;
|
|
}
|
|
}
|
|
} |