using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMove : MonoBehaviour
{
public float moveSpeed = 2f;
public float rotateSpeed = 0.01f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode).UpArrow)
{
this.transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode).DownArrow)
{
this.transform.Translate(Vector3.back * moveSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode).LeftArrow)
{
this.transform.Rotate(Vector3.down * rotateSpeeed);
}
if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode).RightArrow)
{
this.transform.Rotate(Vector3.up * rotateSpeeed);
}
}
}