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.
58 lines
2.5 KiB
58 lines
2.5 KiB
//------------------------------------------------------------------------------
|
|
// <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.MovementComponent movement { get { return (CoreGame.Render.MovementComponent)GetComponent(CombatComponentsLookup.Movement); } }
|
|
public bool hasMovement { get { return HasComponent(CombatComponentsLookup.Movement); } }
|
|
|
|
public void AddMovement(float newJoySpeed, float newDirection) {
|
|
var index = CombatComponentsLookup.Movement;
|
|
var component = (CoreGame.Render.MovementComponent)CreateComponent(index, typeof(CoreGame.Render.MovementComponent));
|
|
component.joySpeed = newJoySpeed;
|
|
component.direction = newDirection;
|
|
AddComponent(index, component);
|
|
}
|
|
|
|
public void ReplaceMovement(float newJoySpeed, float newDirection) {
|
|
var index = CombatComponentsLookup.Movement;
|
|
var component = (CoreGame.Render.MovementComponent)CreateComponent(index, typeof(CoreGame.Render.MovementComponent));
|
|
component.joySpeed = newJoySpeed;
|
|
component.direction = newDirection;
|
|
ReplaceComponent(index, component);
|
|
}
|
|
|
|
public void RemoveMovement() {
|
|
RemoveComponent(CombatComponentsLookup.Movement);
|
|
}
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <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> _matcherMovement;
|
|
|
|
public static Entitas.IMatcher<CombatEntity> Movement {
|
|
get {
|
|
if (_matcherMovement == null) {
|
|
var matcher = (Entitas.Matcher<CombatEntity>)Entitas.Matcher<CombatEntity>.AllOf(CombatComponentsLookup.Movement);
|
|
matcher.componentNames = CombatComponentsLookup.componentNames;
|
|
_matcherMovement = matcher;
|
|
}
|
|
|
|
return _matcherMovement;
|
|
}
|
|
}
|
|
}
|
|
|