Beispiel #1
0
    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));
        }
    }
Beispiel #2
0
    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}");
        }
    }
Beispiel #3
0
    public void NewStatementSelected(int i)
    {
        InstructionEnum inst = (InstructionEnum)i;

        AttributeDropdown.gameObject.SetActive(inst == InstructionEnum.MOVE);
    }