using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public float speed;
private Rigidbody2D rb;
private Vector2 moveVelocity;
private float lookleft;
public KeyCode A;
// Start is called before the first frame update
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
Vector2 moveInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
moveVelocity = moveInput.normalized * speed;
if (Input.GetKeyDown(KeyCode A) = lookleft)
{
}
}
void FixedUpdate()
{
rb.MoveRotation(rb.rotation + Time.fixedDeltaTime);
}
,using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public float speed;
private Rigidbody2D rb;
private Vector2 moveVelocity;
private float lookleft;
public KeyCode A;
// Start is called before the first frame update
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
Vector2 moveInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
moveVelocity = moveInput.normalized * speed;
if (Input.GetKeyDown(KeyCode A) = lookleft)
{
}
}
void FixedUpdate()
{
rb.MoveRotation(rb.rotation + Time.fixedDeltaTime);
}