示例#1
0
文件: Game.cs 项目: BVaflick/gemtd
    public static Toxin SpawnToxin()
    {
        Toxin toxin = instance.warFactory.Toxin;

        // instance.nonEnemies.Add(poison);
        return(toxin);
    }
示例#2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Brute.GetHashCode();
         hashCode = (hashCode * 397) ^ Burn.GetHashCode();
         hashCode = (hashCode * 397) ^ Toxin.GetHashCode();
         hashCode = (hashCode * 397) ^ Suffocation.GetHashCode();
         return(hashCode);
     }
 }
示例#3
0
文件: Poison.cs 项目: BVaflick/gemtd
    public override void Modify(TargetPoint target, float damage)
    {
        WarEntity b = (WarEntity)target.Enemy.Effects.Behaviors.Find(effect => ((WarEntity)effect).name1 == this.GetType().Name + level);

        if (b != null)
        {
            b.age = 0f;
        }
        else
        {
            Toxin toxin = Game.SpawnToxin();
            toxin.Initialize(target, this.GetType().Name + level);
            target.Enemy.Effects.Add(toxin);
        }
    }
示例#4
0
 public bool Equals(Damage other)
 {
     return(Brute.Equals(other.Brute) && Burn.Equals(other.Burn) && Toxin.Equals(other.Toxin) && Suffocation.Equals(other.Suffocation));
 }