You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
using Entitas;
|
|
using Entitas.CodeGeneration.Attributes;
|
|
using Game;
|
|
using Articy.Touhou.Features;
|
|
|
|
public enum ETeam
|
|
{
|
|
Player,
|
|
Monster,
|
|
None,
|
|
}
|
|
|
|
//所有实体都会有的
|
|
public class CommonData
|
|
{
|
|
public string CfgId;
|
|
public bool IsCreate;
|
|
public EntityCreateHandler CreateCallback;
|
|
public bool IsDestroy;
|
|
public EntityParamFeature BasicCfg;
|
|
public ETeam Team;
|
|
public string Effect;
|
|
public string EffectCreate;
|
|
public string EffectDestroy;
|
|
public bool IsFreeControl = true;
|
|
public int Owner;
|
|
public int Target;
|
|
}
|
|
|
|
[Game]
|
|
public class IDComponent : IComponent
|
|
{
|
|
[PrimaryEntityIndex]
|
|
public int Value;
|
|
public CommonData Data;
|
|
}
|
|
namespace Game
|
|
{
|
|
public abstract partial class Util
|
|
{
|
|
public static void ClearId(GameEntity entity)
|
|
{
|
|
var id = entity.iD;
|
|
id.Data.IsDestroy = false;
|
|
id.Data.Effect = "";
|
|
id.Data.EffectCreate = "";
|
|
id.Data.EffectDestroy = "";
|
|
id.Data.IsFreeControl = true;
|
|
id.Data.Owner = 0;
|
|
id.Data.Target = 0;
|
|
}
|
|
}
|
|
} |