Beispiel #1
0
 /// <summary>
 /// Creates a new weapon with specified name and attributes.
 /// </summary>
 public Weapon(WeaponProperties data, CombatProperties propes, Attributes attri, StatusEffectProperties effect)
 {
     WeaponData = data;
     CombatProperties = propes;
     Attributes = attri;
     Effect = effect;
 }
 /// <summary>
 /// Applies a status effect to this entity
 /// </summary>
 public void ApplyStatusEffect(StatusEffectProperties attributes)
 {
     var constructor = Helper.GetObjectConstructor<StatusEffect>(string.Format("Corvus.Components.Gameplay.StatusEffects.{0}", attributes.EffectType), new Type[] { typeof(Entity), typeof(StatusEffectProperties) });
     var statusEffect = constructor(this.Parent, attributes);
     if (!_StatusEffects.Contains(statusEffect.Name))
         CorvEngine.AudioManager.PlaySoundEffect((statusEffect.IsPositive) ? "StatusEffectGood" : "Curse2");
     _StatusEffects.Add(statusEffect);
 }
Beispiel #3
0
 /// <summary>
 /// Creates a new instance of StatusEffect.
 /// </summary>
 /// <param name="entity">The entity being affected.</param>
 public StatusEffect(Entity entity, StatusEffectProperties attributes)
 {
     var effect = CorvusGame.Instance.GlobalContent.LoadSprite(SpriteName);
     var animation = effect.Animations.First();
     effect.PlayAnimation(animation.Name);
     this._Sprite = effect;
     this._Entity = entity;
     this._Attributes = attributes;
     FloatingTextComponent = entity.GetComponent<FloatingTextComponent>();
 }
Beispiel #4
0
        /// <summary>
        /// Creates a new instance of StatusEffect.
        /// </summary>
        /// <param name="entity">The entity being affected.</param>
        public StatusEffect(Entity entity, StatusEffectProperties attributes)
        {
            var effect    = CorvusGame.Instance.GlobalContent.LoadSprite(SpriteName);
            var animation = effect.Animations.First();

            effect.PlayAnimation(animation.Name);
            this._Sprite          = effect;
            this._Entity          = entity;
            this._Attributes      = attributes;
            FloatingTextComponent = entity.GetComponent <FloatingTextComponent>();
        }
Beispiel #5
0
 //Unfortunately, need to specify this in order for StatusEffectsComponent to work properly.
 public Poison(Entity entity, StatusEffectProperties attributes) : base(entity, attributes)
 {
 }
Beispiel #6
0
 public Fleet(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #7
0
 //Unfortunately, need to specify this in order for StatusEffectsComponent to work properly.
 public Poison(Entity entity, StatusEffectProperties attributes)
     : base(entity, attributes)
 {
 }
Beispiel #8
0
 public Healing(Entity entity, StatusEffectProperties attributes)
     : base(entity, attributes)
 {
 }
Beispiel #9
0
 public Pierce(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #10
0
 public Slow(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #11
0
 public Recover(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #12
0
 public Fleet(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #13
0
 public ManaHeal(Entity entity, StatusEffectProperties sep)
     : base(entity, sep)
 {
 }
Beispiel #14
0
 public Healing(Entity entity, StatusEffectProperties attributes) : base(entity, attributes)
 {
 }
Beispiel #15
0
 public Vigor(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #16
0
 public ManaHeal(Entity entity, StatusEffectProperties sep) : base(entity, sep)
 {
 }
Beispiel #17
0
 public IWorkOut(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #18
0
 public IWorkOut(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #19
0
 public Pierce(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #20
0
 public Weakness(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #21
0
 public Vigor(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #22
0
 public Recover(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }
Beispiel #23
0
 public Slow(Entity entity, StatusEffectProperties prop)
     : base(entity, prop)
 {
 }
Beispiel #24
0
 public Weakness(Entity entity, StatusEffectProperties prop) : base(entity, prop)
 {
 }