-
-
Save schmidtgit/666e43e4b0a4a3b332b1feb99898afe0 to your computer and use it in GitHub Desktop.
Famous Cyclone rush
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Abathur.Constants; | |
using Abathur.Core; | |
using Abathur.Model; | |
using Abathur.Modules; | |
using System.Linq; | |
namespace Launcher.Modules { | |
public class EmptyModule : IModule { | |
private IProductionManager _queue; | |
private IIntelManager _intel; | |
private ICombatManager _combat; | |
public EmptyModule(IProductionManager productionManager, ICombatManager combatManager, IIntelManager intelManager) { | |
_queue = productionManager; | |
_combat = combatManager; | |
_intel = intelManager; | |
} | |
public void OnStart() { | |
for(int i = 0; i < 10000; i++) | |
_queue.QueueUnit(BlizzardConstants.Unit.Cyclone); | |
_intel.Handler.RegisterHandler(Case.UnitAddedSelf,u => UnitAddedEvent(u)); | |
} | |
private void UnitAddedEvent(IUnit unit) { | |
var enemyBase = _intel.Colonies.FirstOrDefault(c => c.IsStartingLocation); | |
_combat.AttackMove(unit.Tag,enemyBase.Point); | |
} | |
public void OnStep() {} | |
public void Initialize() { } | |
public void OnGameEnded() {} | |
public void OnRestart() {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment