Answers for "error cs1513 expected unity"

C#
0

error cs1513 expected unity

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour
{
    public float moveSpeed = 10f;

    private Rigidbody2D rb;

    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
    {
        //"A" - "-1"
        //"D" = "1"

        Vector3 movement -new Vector3(Input.GetAxis("Horizontal"), 0f, 0f);
        transform.position += movement * Time.deltaTime * moveSpeed;

        if (Input.GetkeyDown(keyCode.Space))
        {
            Jump();
        }



        void Jump()
        {
            rb.AddForce(new Vector2(0f, 5f), ForceMode2D.Impulse);
        }
    }
Posted by: Guest on April-29-2021
-1

how to fix error cs1513 in unity

cs1513
Posted by: Guest on November-22-2020

Code answers related to "error cs1513 expected unity"

C# Answers by Framework

Browse Popular Code Answers by Language