Управление на кнопках в 2D игре для телефона

Помогите пожалуйста с скриптом для управления 2д игры доя телефона. Нужно что бы персонаж прыгал вверх, шел вправо, влево…
Скиньте скрипт, пожалуйста!

I don’t have any phone for testing, this just the script for jumping. If you can get it working then you can add to it other UI-Images and conditions for moving.

Add UI-Image in the scene (later you can use it as picture for the “Jump” button). Add this script to the player with rigidbody2d and collider2d. Fill the scripts fields with objects. Try it with unity-remote or as builded app.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class TouchCtrl : MonoBehaviour
{
    //add UI-Image in the scene and drag&drop it here
    public GameObject jumpImage;
    //drag&drop here EventSystem
    public EventSystem eventSystem;
    //drag&drop here Canvas (it should have Graphic Raycaster (Script) component)
    public GraphicRaycaster canvasRaycaster;
    Rigidbody2D rb;
    bool canJump;
    //make it bigger for testing (like 100)
    public float jumpForce;

    void Start ()
    {
        rb = GetComponent<Rigidbody2D>();
    }

    void Update ()
    {
        for (int i = 0; i < Input.touchCount; i++)
        {
            Touch touch = Input.GetTouch(i);
            if (touch.phase == TouchPhase.Began)
            {
                PointerEventData pointerEventData = new PointerEventData(eventSystem);
                pointerEventData.position = touch.position;
                List<RaycastResult> results = new List<RaycastResult>();
                canvasRaycaster.Raycast(pointerEventData, results);
                if (results != null)
                {
                    foreach (RaycastResult result in results)
                    {
                        if (result.gameObject == jumpImage)
                        {
                            canJump = true;
                        }
                    }
                }
            }
        }
    }

    void FixedUpdate ()
    {
        if (canJump)
        {
            canJump = false;
            rb.AddForce(Vector2.up * jumpForce);
        }
    }
}