public WaypathManager(IMyTextSurface outputSurface) { this.outputSurface = outputSurface; paths = new List <Waypath>(); currentIndex = 0; commandTree = new PanelCommander.CommandTree() { label = "Waypath Manager", commands = new List <PanelCommander.Command>() { new PanelCommander.Command() { label = "Next Waypath", action = NextWaypath }, new PanelCommander.Command() { label = "Delete Waypath", action = DeleteWaypath } }, subtrees = new List <PanelCommander.CommandTree>(), }; DrawOutput(); }
public GreedleManager(IMyIntergridCommunicationSystem IGC, IMyTextSurface outputSurface) { this.IGC = IGC; this.responseListener = IGC.RegisterBroadcastListener("greedle_response"); this.responseListener.SetMessageCallback("Message Callback"); this.greedles = new List <Greedle>(); this.outputSurface = outputSurface; commandTree = new PanelCommander.CommandTree() { label = "Greedle Commands", commands = new List <PanelCommander.Command>() { new PanelCommander.Command() { label = "List", action = ListGreedles }, new PanelCommander.Command() { label = "Check For Greedle Updates", action = CheckForUpdates } }, subtrees = new List <PanelCommander.CommandTree>(), }; ListGreedles(); }
public WaypointTraveller(MotorControl motorControl, IMyRemoteControl mainControl, IMyTextSurface outputSurface) { this.motorControl = motorControl; this.mainControl = mainControl; this.outputSurface = outputSurface; this.currentPointIndex = 0; this.travelState = TravelState.Stopped; this.path = new Waypath("Default Path", new List <Waypoint>()); commandTree = new PanelCommander.CommandTree() { label = "Waypath Traveller", commands = new List <PanelCommander.Command>() { new PanelCommander.Command() { label = "Travel", action = Travel }, new PanelCommander.Command() { label = "Pause", action = Pause }, new PanelCommander.Command() { label = "Skip", action = Skip }, new PanelCommander.Command() { label = "Back", action = Back }, new PanelCommander.Command() { label = "Reset", action = Reset }, new PanelCommander.Command() { label = "Stop", action = Stop }, }, subtrees = new List <PanelCommander.CommandTree>(), }; }
public WaypathRecorder( IMyRemoteControl mainControl, Waypath initalPath, IMyTextSurface outputSurface, Action <Waypath> onPathUpdate ) { this.mainControl = mainControl; this.outputSurface = outputSurface; this.pathName = initalPath.name; this.pathPoints = initalPath.points.ToList(); this.onPathUpdate = onPathUpdate; commandTree = new PanelCommander.CommandTree() { label = "Recorder", commands = new List <PanelCommander.Command>() { new PanelCommander.Command() { label = "Record", action = RecordPoint }, new PanelCommander.Command() { label = "Undo", action = Undo }, new PanelCommander.Command() { label = "Reset", action = Reset }, new PanelCommander.Command() { label = "Reverse", action = Reverse } }, subtrees = new List <PanelCommander.CommandTree>(), }; DrawOutput(); }