public NeutralKIController(GDGameScreen owner, Cannon cannon, Fraction fraction) : base(NEUTRAL_UPDATE_TIME, owner, cannon, fraction, 0f) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet", FindTargetAttackingBullet), }; }
public BulletKIController(GDGameScreen owner, Cannon cannon, Fraction fraction) : base(STANDARD_UPDATE_TIME, owner, cannon, fraction, 0f) { if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_RAYTRACE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreateRaycast("SupportCannon", FindTargetSupportCannon), KIMethod.CreateRaycast("NeutralCannon", FindTargetNeutralCannon), KIMethod.CreateRaycast("EnemyCannon", FindTargetEnemyCannon), KIMethod.CreateRaycast("FriendlyCannon", FindTargetFriendlyCannon), KIMethod.CreateRaycast("BlockedEnemyCannon", FindTargetBlockedEnemyCannon), KIMethod.CreateRaycast("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannon), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRECALC) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), KIMethod.CreatePrecalc("NeutralCannon", FindTargetNeutralCannonPrecalc), KIMethod.CreatePrecalc("EnemyCannon", FindTargetEnemyCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("BlockedEnemyCannon", FindTargetBlockedEnemyCannonPrecalc), KIMethod.CreatePrecalc("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannonPrecalc), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRESIMULATE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), KIMethod.CreatePrecalc("NeutralCannon", FindTargetNeutralCannonPrecalc), KIMethod.CreatePrecalc("EnemyCannon", FindTargetEnemyCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("BlockedEnemyCannon", FindTargetBlockedEnemyCannonPrecalc), KIMethod.CreatePrecalc("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannonPrecalc), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else { throw new Exception("Unknown KIType: " + owner.Blueprint.KIType); } }
public ShieldProjectorKIController(GDGameScreen owner, Cannon cannon, Fraction fraction) : base(LASER_UPDATE_TIME, owner, cannon, fraction, MIN_LASER_ROT) { if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_RAYTRACE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("ShieldCannon", FindTargetShieldCannon), KIMethod.CreateRaycast("FriendlyCannon", FindTargetFriendlyCannon), KIMethod.CreateRaycast("SupportCannon", FindTargetSupportCannon), KIMethod.CreateRaycast("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannon), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRECALC) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreatePrecalc("ShieldCannon", FindTargetShieldCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRESIMULATE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreatePrecalc("ShieldCannon", FindTargetShieldCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), KIMethod.CreatePrecalc("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannonPrecalc), }; } else { throw new Exception("Unknown KIType: " + owner.Blueprint.KIType); } }
public LaserKIController(GDGameScreen owner, Cannon cannon, Fraction fraction) : base(LASER_UPDATE_TIME, owner, cannon, fraction, MIN_LASER_ROT) { if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_RAYTRACE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreateCustom("KeepAttacking", KeepAttackingEnemyCannon), KIMethod.CreateCustom("KeepSupporting", KeepSupportingFriendlyCannon), KIMethod.CreateRaycast("SupportCannon", FindTargetSupportCannon), KIMethod.CreateRaycast("NeutralCannon", FindTargetNeutralCannon), KIMethod.CreateRaycast("EnemyCannon", FindTargetEnemyCannon), KIMethod.CreateRaycast("FriendlyCannon", FindTargetFriendlyCannon), KIMethod.CreateRaycast("IdiotBoost", FindTargetAnyFriendlyCannon), // fallback when nothing makes any sense KIMethod.CreateRaycast("BlockedEnemyCannon", FindTargetBlockedEnemyCannon), KIMethod.CreateRaycast("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannon), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRECALC) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreateCustom("KeepAttacking", KeepAttackingEnemyCannon), KIMethod.CreateCustom("KeepSupporting", KeepSupportingFriendlyCannon), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), KIMethod.CreatePrecalc("NeutralCannon", FindTargetNeutralCannonPrecalc), KIMethod.CreatePrecalc("EnemyCannon", FindTargetEnemyCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("IdiotBoost", FindTargetAnyFriendlyCannonPrecalc), // fallback when nothing makes any sense KIMethod.CreatePrecalc("BlockedEnemyCannon", FindTargetBlockedEnemyCannonPrecalc), KIMethod.CreatePrecalc("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannonPrecalc), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else if (owner.Blueprint.KIType == LevelBlueprint.KI_TYPE_PRESIMULATE) { intelligence = new List <KIMethod> { KIMethod.CreateDefense("AttackingLaser", FindTargetAttackingLaser), KIMethod.CreateRaycast("AttackingBullet,", FindTargetAttackingBullet), KIMethod.CreateCustom("KeepAttacking", KeepAttackingEnemyCannon), KIMethod.CreateCustom("KeepSupporting", KeepSupportingFriendlyCannon), KIMethod.CreatePrecalc("SupportCannon", FindTargetSupportCannonPrecalc), KIMethod.CreatePrecalc("NeutralCannon", FindTargetNeutralCannonPrecalc), KIMethod.CreatePrecalc("EnemyCannon", FindTargetEnemyCannonPrecalc), KIMethod.CreatePrecalc("FriendlyCannon", FindTargetFriendlyCannonPrecalc), KIMethod.CreatePrecalc("IdiotBoost", FindTargetAnyFriendlyCannonPrecalc), // fallback when nothing makes any sense KIMethod.CreatePrecalc("BlockedEnemyCannon", FindTargetBlockedEnemyCannonPrecalc), KIMethod.CreatePrecalc("BlockedFriendlyCannon", FindTargetBlockedFriendlyCannonPrecalc), KIMethod.CreateRaycast("NearestEnemyCannon", FindNearestEnemyCannon), }; } else { throw new Exception("Unknown KIType: " + owner.Blueprint.KIType); } }