public override void Run() { #region Necessary properties Enemy = new EnemyData(); V0 = 9.9f; V1 = Enemy.Distance; V2 = 420; V3 = Enemy.Distance; V4 = 1; V5 = Enemy.Distance; V6 = X; V7 = 9999999; #endregion #region My First Robot TurnLeft(Heading - 90); TurnGunRight(90); #endregion #region GARICS Console.WriteLine("Entered run method"); BodyColor = Color.Pink; StateManager = new StateManagerScript(new State0(this)); #endregion while (true) { #region My first robot // Move our robot 5000 pixels ahead Ahead(5000); // Turn the robot 90 degrees TurnRight(90); #endregion #region GARICS StateManager.FrameCheck(); SetFire(3); Execute(); OldEnemy = Enemy; #endregion } }
/// <summary> /// This method is called as soon as the match is loaded /// </summary> public override void Run() { Console.WriteLine("Run"); Enemy = new EnemyData(); _stateManagerTop = new StateManagerScript(new SeekState(this)); _stateManagerBottom = new StateManagerScript(new WanderState(this)); while (true) { _stateManagerTop.FrameCheck(); _stateManagerBottom.FrameCheck(); Execute(); OldEnemy = Enemy; } }
public override void Run() { Enemy = new EnemyData(); _stateManager = new StateManagerScript(new State0(this)); v0 = ourRobot.X; v1 = ourRobot.Enemy.Position.Y; v2 = ourRobot.BattleFieldHeight; v3 = 1.1; v4 = ourRobot.Energy; v5 = ourRobot.X; v6 = 1.1; while (true) { _stateManager.FrameCheck(); Execute(); OldEnemy = Enemy; } }