public ShapeShifter() { robotBehaviors.Add(new ShockWaveBehavior(this)); robotBehaviors.Add(new MegaCrasherBehavior(this)); robotBehaviors.Add(new RambotBehavior(this)); currentBehavior = robotBehaviors[currentBehaviorIndex]; }
private void SetNextBehavior() { if (kills < deaths) { if (currentBehaviorIndex == robotBehaviors.Count() - 1) { currentBehaviorIndex = 0; } else { currentBehaviorIndex++; } currentBehavior = robotBehaviors[currentBehaviorIndex]; Console.WriteLine("Switching to " + currentBehavior.BehaviorName); } }