Example #1
0
    public ArrayList getProgramFromPanel()
    {
        IComparer comparator = new YPosComparator ();
        commandsDrawn.Sort(comparator);

        ArrayList commandList = new ArrayList();
        foreach(var b in commandsDrawn) {
            GameObject box = (GameObject) b;
            CommandBox commandBox = box.GetComponent<CommandBox>();
            Command command = commandBox.command;

            commandList.Add(command);
        }

        return commandList;
    }
Example #2
0
 public void FixOrderOfBlocks()
 {
     IComparer comparator = new YPosComparator ();
     commandsDrawn.Sort(comparator);
     FixCommandsOrder();
 }