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.4 KiB
C#
59 lines
2.4 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 BagComponent bag { get { return (BagComponent)GetComponent(GameComponentsLookup.Bag); } }
|
|
public bool hasBag { get { return HasComponent(GameComponentsLookup.Bag); } }
|
|
|
|
public void AddBag(Game.MetaDictionary<string, int> newAllBless, System.Collections.Generic.List<string> newChooseBless) {
|
|
var index = GameComponentsLookup.Bag;
|
|
var component = (BagComponent)CreateComponent(index, typeof(BagComponent));
|
|
component.AllBless = newAllBless;
|
|
component.ChooseBless = newChooseBless;
|
|
AddComponent(index, component);
|
|
}
|
|
|
|
public void ReplaceBag(Game.MetaDictionary<string, int> newAllBless, System.Collections.Generic.List<string> newChooseBless) {
|
|
var index = GameComponentsLookup.Bag;
|
|
var component = (BagComponent)CreateComponent(index, typeof(BagComponent));
|
|
component.AllBless = newAllBless;
|
|
component.ChooseBless = newChooseBless;
|
|
ReplaceComponent(index, component);
|
|
}
|
|
|
|
public void RemoveBag() {
|
|
RemoveComponent(GameComponentsLookup.Bag);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherBag;
|
|
|
|
public static Entitas.IMatcher<GameEntity> Bag {
|
|
get {
|
|
if (_matcherBag == null) {
|
|
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.Bag);
|
|
matcher.componentNames = GameComponentsLookup.componentNames;
|
|
_matcherBag = matcher;
|
|
}
|
|
|
|
return _matcherBag;
|
|
}
|
|
}
|
|
}
|