You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
4.1 KiB

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentContextApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class CombatContext {
public CombatEntity jumpTextEntity { get { return GetGroup(CombatMatcher.JumpText).GetSingleEntity(); } }
public CoreGame.Render.JumpTextComponent jumpText { get { return jumpTextEntity.jumpText; } }
public bool hasJumpText { get { return jumpTextEntity != null; } }
public CombatEntity SetJumpText(System.Collections.Generic.Queue<CoreGame.Render.HurtData> newHurtDatas) {
if (hasJumpText) {
throw new Entitas.EntitasException("Could not set JumpText!\n" + this + " already has an entity with CoreGame.Render.JumpTextComponent!",
"You should check if the context already has a jumpTextEntity before setting it or use context.ReplaceJumpText().");
}
var entity = CreateEntity();
entity.AddJumpText(newHurtDatas);
return entity;
}
public void ReplaceJumpText(System.Collections.Generic.Queue<CoreGame.Render.HurtData> newHurtDatas) {
var entity = jumpTextEntity;
if (entity == null) {
entity = SetJumpText(newHurtDatas);
} else {
entity.ReplaceJumpText(newHurtDatas);
}
}
public void RemoveJumpText() {
jumpTextEntity.Destroy();
}
}
//------------------------------------------------------------------------------
// <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 CombatEntity {
public CoreGame.Render.JumpTextComponent jumpText { get { return (CoreGame.Render.JumpTextComponent)GetComponent(CombatComponentsLookup.JumpText); } }
public bool hasJumpText { get { return HasComponent(CombatComponentsLookup.JumpText); } }
public void AddJumpText(System.Collections.Generic.Queue<CoreGame.Render.HurtData> newHurtDatas) {
var index = CombatComponentsLookup.JumpText;
var component = (CoreGame.Render.JumpTextComponent)CreateComponent(index, typeof(CoreGame.Render.JumpTextComponent));
component.hurtDatas = newHurtDatas;
AddComponent(index, component);
}
public void ReplaceJumpText(System.Collections.Generic.Queue<CoreGame.Render.HurtData> newHurtDatas) {
var index = CombatComponentsLookup.JumpText;
var component = (CoreGame.Render.JumpTextComponent)CreateComponent(index, typeof(CoreGame.Render.JumpTextComponent));
component.hurtDatas = newHurtDatas;
ReplaceComponent(index, component);
}
public void RemoveJumpText() {
RemoveComponent(CombatComponentsLookup.JumpText);
}
}
//------------------------------------------------------------------------------
// <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 CombatMatcher {
static Entitas.IMatcher<CombatEntity> _matcherJumpText;
public static Entitas.IMatcher<CombatEntity> JumpText {
get {
if (_matcherJumpText == null) {
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.JumpText);
matcher.componentNames = CombatComponentsLookup.componentNames;
_matcherJumpText = matcher;
}
return _matcherJumpText;
}
}
}