public NPCWeapon(WeaponItemObject weaponItem, WeaponBehaviour weaponBehaviour) { this.Behaviour = weaponBehaviour; this.Behaviour.Weapon = this; HitEffect = weaponItem.HitEffect; Damage = weaponItem.Damage; ProjectileSprite = weaponItem.ProjectileSprite; SpellPreset = weaponItem.SpellPreset; }
public static void RLApplySpell(this EcsWorld world, EcsEntity target, EcsEntity caster, SpellPreset preset) { world.NewEntityWith(out ApplySpellComponent spell); spell.Target = target; spell.Caster = caster; spell.Spell = preset; }
public void Reset() { Target = EcsEntity.Null; Caster = EcsEntity.Null; Spell = null; }
void IEcsAutoReset.Reset() { Spell = null; }