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.
59 lines
2.2 KiB
C#
59 lines
2.2 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator.
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
public partial class GameEntity {
|
|
|
|
public IDComponent iD { get { return (IDComponent)GetComponent(GameComponentsLookup.ID); } }
|
|
public bool hasID { get { return HasComponent(GameComponentsLookup.ID); } }
|
|
|
|
public void AddID(int newValue, CommonData newData) {
|
|
var index = GameComponentsLookup.ID;
|
|
var component = (IDComponent)CreateComponent(index, typeof(IDComponent));
|
|
component.Value = newValue;
|
|
component.Data = newData;
|
|
AddComponent(index, component);
|
|
}
|
|
|
|
public void ReplaceID(int newValue, CommonData newData) {
|
|
var index = GameComponentsLookup.ID;
|
|
var component = (IDComponent)CreateComponent(index, typeof(IDComponent));
|
|
component.Value = newValue;
|
|
component.Data = newData;
|
|
ReplaceComponent(index, component);
|
|
}
|
|
|
|
public void RemoveID() {
|
|
RemoveComponent(GameComponentsLookup.ID);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator.
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
public sealed partial class GameMatcher {
|
|
|
|
static Entitas.IMatcher<GameEntity> _matcherID;
|
|
|
|
public static Entitas.IMatcher<GameEntity> ID {
|
|
get {
|
|
if (_matcherID == null) {
|
|
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.ID);
|
|
matcher.componentNames = GameComponentsLookup.componentNames;
|
|
_matcherID = matcher;
|
|
}
|
|
|
|
return _matcherID;
|
|
}
|
|
}
|
|
}
|