public override EstadoNPC OnDaniadoPor(Thing thing) { if (thing is ThingNave) { ThingNave naveAtacante = (ThingNave)thing; if (naveAtacante.Faccion != nave.Faccion && naveAtacante.Faccion != null) { Faccion.RelacionConOtraFaccionEnum relacionConFaccionAtacante = nave.Faccion.GetRelacion(naveAtacante.Faccion); if (relacionConFaccionAtacante != Faccion.RelacionConOtraFaccionEnum.Amigable) { //Si la relación con la facción a la que pertenece la nave que me ataca es distinta a amigable, la empiezo a atacar thingAAtacar = naveAtacante; } } } return(this); }
public EstadoNPCAtacar(ThingNaveNPC nave, ThingDaniable thingAAtacar) : base(nave) { this.thingAAtacar = thingAAtacar; }