public static IAction GetAction(RoverAction rAction)
        {
            IAction action;

            switch (rAction)
            {
            case RoverAction.L:
                action = new TurnLeftAction();
                break;

            case RoverAction.R:
                action = new TurnRightAction();
                break;

            case RoverAction.M:
                action = new MoveForwardAction();
                break;

            default:
                action = new NoAction();
                break;
            }

            return(action);
        }
Exemple #2
0
    private void MovePlayerForward()
    {
        MoveForwardAction forward = new MoveForwardAction(PlayerGameObject.transform, pathController);

        forward.Trigger(null);
    }