(clienr) feat:事件定义
This commit is contained in:
@ -2,8 +2,13 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
public class LocationRangeDef:Define
|
||||
public class EntityEventDef:Define
|
||||
{
|
||||
public BuildingDef buildingDef;
|
||||
public MonsterDef monster;
|
||||
public CharacterDef character; // 要生成的实体Def的defName
|
||||
public int count = 1; // 生成的数量
|
||||
|
||||
public float minRadius = 0f; // 最小距离(以格数单位)
|
||||
public float maxRadius = 10f; // 最大距离(以格数单位)
|
||||
public int width = 5; // 宽度(以格数单位),指定一个方形区域
|
@ -1,21 +1,8 @@
|
||||
namespace Data
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
None,
|
||||
SpawnCharacter,
|
||||
SpawnBuilding,
|
||||
SpawnBullet,
|
||||
SpawnPickup,
|
||||
SpawnDefaultEntity,
|
||||
}
|
||||
public class EventDef : Define
|
||||
{
|
||||
public EventType eventType = EventType.None;
|
||||
public EntityDef entityDef_Character; // 用于 EventType.SpawnCharacter
|
||||
public BuildingDef entityDef_Building; // 用于 EventType.SpawnBuilding
|
||||
public BulletDef entityDef_Bullet; // 用于 EventType.SpawnBullet
|
||||
public ItemDef entityDef_Pickup; // 用于 EventType.SpawnPickup
|
||||
public EventDef() { }
|
||||
public HediffEventDef hediffEvent;
|
||||
public EntityEventDef entityEvent;
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace Data
|
||||
{
|
||||
public class FactionRequirementDef:Define
|
||||
{
|
||||
public string factionDefName; // 目标的派系DefName
|
||||
public bool forAllPawnsInFaction = false; // 是否为该派系的所有Pawns添加Hediff
|
||||
public int specificPawnCount = 1; // 如果不是所有Pawns,指定数量
|
||||
}
|
||||
}
|
@ -4,10 +4,7 @@ namespace Data
|
||||
{
|
||||
public class HediffDef:Define
|
||||
{
|
||||
// 默认安装的身体部位 (例如 "Lung", "Heart")
|
||||
public string defaultInstallPart = null;
|
||||
// 是否阻止肺部疾病 (例如肺腐烂)
|
||||
public bool preventsLungRot = false;
|
||||
public float time = -1;
|
||||
// Hediff的发展阶段列表
|
||||
public List<HediffStageDef> stages = new List<HediffStageDef>();
|
||||
// 附加的组件列表
|
||||
|
11
Client/Assets/Scripts/Data/HediffEventDef.cs
Normal file
11
Client/Assets/Scripts/Data/HediffEventDef.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Data
|
||||
{
|
||||
public class HediffEventDef:Define
|
||||
{
|
||||
public HediffDef hediff; // 要添加的HediffDef的defName
|
||||
public float hediffSeverity = 1.0f; // 添加时Hediff的严重程度或进度
|
||||
public AffiliationDef affiliation; // 目标的派系DefName
|
||||
public bool forAllPawnsInFaction = false; // 是否为该派系的所有Pawns添加Hediff
|
||||
public int specificPawnCount = 1; // 如果不是所有Pawns,指定数量
|
||||
}
|
||||
}
|
@ -4,7 +4,6 @@ namespace Data
|
||||
{
|
||||
public class ImageDef : Define
|
||||
{
|
||||
public string name;
|
||||
public string path;
|
||||
public int wCount;
|
||||
public int hCount;
|
||||
@ -13,7 +12,6 @@ namespace Data
|
||||
public override bool Init(XElement xmlDef)
|
||||
{
|
||||
base.Init(xmlDef);
|
||||
name = defName;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
13
Client/Assets/Scripts/Data/StoryDef.cs
Normal file
13
Client/Assets/Scripts/Data/StoryDef.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Data
|
||||
{
|
||||
public class StoryStageDef : Define
|
||||
{
|
||||
public float lastWaitTime = 0;
|
||||
public EventDef eventDef;
|
||||
public float nextWaitTime = 0;
|
||||
}
|
||||
public class StoryDef:Define
|
||||
{
|
||||
public StoryStageDef[] storyStage;
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/Data/StoryDef.cs.meta
Normal file
3
Client/Assets/Scripts/Data/StoryDef.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e11d701b7d8b4af0a947d630884bfeab
|
||||
timeCreated: 1756306428
|
Reference in New Issue
Block a user