50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description: 成就工厂类
|
|
* @Date: 2025年05月14日 星期三 20:05:16
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
namespace Logic.Achievement
|
|
{
|
|
public class AchievementFactory
|
|
{
|
|
public static AchievementConditionBase GetAchievementCondition(AchievementConditionType type)
|
|
{
|
|
AchievementConditionBase item = null;
|
|
switch (type)
|
|
{
|
|
case AchievementConditionType.TrainGiant:
|
|
item = new TrainGiantCondition();
|
|
break;
|
|
case AchievementConditionType.BuildWonder:
|
|
item = new BuildWonderConditionCondition();
|
|
break;
|
|
case AchievementConditionType.WonderInCity:
|
|
item = new WonderInCityConditionCondition();
|
|
break;
|
|
case AchievementConditionType.UnitOnWonder:
|
|
item = new UnitOnWonderConditionCondition();
|
|
break;
|
|
case AchievementConditionType.AroundBuildings:
|
|
item = new AroundBuildingsConditionCondition();
|
|
break;
|
|
case AchievementConditionType.AroundWonders:
|
|
item = new AroundWondersConditionCondition();
|
|
break;
|
|
case AchievementConditionType.AroundEnemyUnits:
|
|
item = new AroundEnemyUnitsConditionCondition();
|
|
break;
|
|
case AchievementConditionType.AroundSelfUnits:
|
|
item = new AroundSelfUnitsConditionCondition();
|
|
break;
|
|
case AchievementConditionType.AroundCityGrids:
|
|
item = new AroundCityGridsConditionCondition();
|
|
break;
|
|
}
|
|
|
|
return item;
|
|
}
|
|
}
|
|
} |