//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
public partial class CombatEntity {
public CoreGame.Render.BulletComponent bullet { get { return (CoreGame.Render.BulletComponent)GetComponent(CombatComponentsLookup.Bullet); } }
public bool hasBullet { get { return HasComponent(CombatComponentsLookup.Bullet); } }
public void AddBullet(int newCasterEid, ElementType newElementType, CoreGame.Render.BulletFromType newBulletFromType, int newBulletCfgId, Sog.Fixed64 newExistTime, Sog.Fixed64 newMaxDistance, Sog.Fixed64 newScale, Sog.Fixed64 newSpeed, ColliderType newColliderType, Sog.Fixed64 newColliderParam1, Sog.Fixed64 newColliderParam2, int newCollideWith, int newCollisionCnt, Sog.Fixed64 newCollisionInterval, int newAbilityId, int newEndAbilityId, bool newIsTriggerHitSkillOnEnd, System.Collections.Generic.List newHitDatas) {
var index = CombatComponentsLookup.Bullet;
var component = (CoreGame.Render.BulletComponent)CreateComponent(index, typeof(CoreGame.Render.BulletComponent));
component.casterEid = newCasterEid;
component.elementType = newElementType;
component.bulletFromType = newBulletFromType;
component.bulletCfgId = newBulletCfgId;
component.existTime = newExistTime;
component.maxDistance = newMaxDistance;
component.scale = newScale;
component.speed = newSpeed;
component.colliderType = newColliderType;
component.colliderParam1 = newColliderParam1;
component.colliderParam2 = newColliderParam2;
component.collideWith = newCollideWith;
component.collisionCnt = newCollisionCnt;
component.collisionInterval = newCollisionInterval;
component.abilityId = newAbilityId;
component.endAbilityId = newEndAbilityId;
component.isTriggerHitSkillOnEnd = newIsTriggerHitSkillOnEnd;
component.hitDatas = newHitDatas;
AddComponent(index, component);
}
public void ReplaceBullet(int newCasterEid, ElementType newElementType, CoreGame.Render.BulletFromType newBulletFromType, int newBulletCfgId, Sog.Fixed64 newExistTime, Sog.Fixed64 newMaxDistance, Sog.Fixed64 newScale, Sog.Fixed64 newSpeed, ColliderType newColliderType, Sog.Fixed64 newColliderParam1, Sog.Fixed64 newColliderParam2, int newCollideWith, int newCollisionCnt, Sog.Fixed64 newCollisionInterval, int newAbilityId, int newEndAbilityId, bool newIsTriggerHitSkillOnEnd, System.Collections.Generic.List newHitDatas) {
var index = CombatComponentsLookup.Bullet;
var component = (CoreGame.Render.BulletComponent)CreateComponent(index, typeof(CoreGame.Render.BulletComponent));
component.casterEid = newCasterEid;
component.elementType = newElementType;
component.bulletFromType = newBulletFromType;
component.bulletCfgId = newBulletCfgId;
component.existTime = newExistTime;
component.maxDistance = newMaxDistance;
component.scale = newScale;
component.speed = newSpeed;
component.colliderType = newColliderType;
component.colliderParam1 = newColliderParam1;
component.colliderParam2 = newColliderParam2;
component.collideWith = newCollideWith;
component.collisionCnt = newCollisionCnt;
component.collisionInterval = newCollisionInterval;
component.abilityId = newAbilityId;
component.endAbilityId = newEndAbilityId;
component.isTriggerHitSkillOnEnd = newIsTriggerHitSkillOnEnd;
component.hitDatas = newHitDatas;
ReplaceComponent(index, component);
}
public void RemoveBullet() {
RemoveComponent(CombatComponentsLookup.Bullet);
}
}
//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
public sealed partial class CombatMatcher {
static Entitas.IMatcher _matcherBullet;
public static Entitas.IMatcher Bullet {
get {
if (_matcherBullet == null) {
var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Bullet);
matcher.componentNames = CombatComponentsLookup.componentNames;
_matcherBullet = matcher;
}
return _matcherBullet;
}
}
}