public override Instruction GetInstruction() { InstructionEnum inst = (InstructionEnum)ActionDropdown.value; if (inst == InstructionEnum.MOVE) { return(new MoveInstruction(((DirectionEnum)AttributeDropdown.value).GetDirectionValue(), LineNumber)); } else { return(new GrabInstruction(LineNumber)); } }
public override string ToString() { InstructionEnum inst = (InstructionEnum)ActionDropdown.value; if (inst == InstructionEnum.MOVE) { return($"{(InstructionEnum)ActionDropdown.value} {(DirectionEnum)AttributeDropdown.value}"); } else { return($"{(InstructionEnum)ActionDropdown.value}"); } }
public void NewStatementSelected(int i) { InstructionEnum inst = (InstructionEnum)i; AttributeDropdown.gameObject.SetActive(inst == InstructionEnum.MOVE); }