public static float MoveCommandsDuration(List <Vector2> commandList, RobotHeight robotHeight) { float duration = 0; foreach (var item in commandList) { duration += CommandDuration(CommandType.MOVE_TO, robotHeight); } return(duration); }
public static float CommandDuration(CommandType cmd, RobotHeight rHeight) { switch (cmd) { case CommandType.MOVE_TO: if (rHeight == RobotHeight.HIGH) { return(0.5f); } else { return(0.8f); } case CommandType.GUARD: return(0.5f); case CommandType.SET_ANGLE: return(0.0f); case CommandType.CHANGE_WEAPON: return(0.2f); case CommandType.CHANGE_HEIGHT: return(0.1f); case CommandType.AGG_MOVE_TO: if (rHeight == RobotHeight.HIGH) { return(0.5f); } else { return(0.8f); } default: break; } return(float.MaxValue); }