can someone please help me because this error is getting annoying and I dont know how to fix it -_-
using UnityEngine;
using System.Collections;
UnityEngine.Component.transform
public class Player:Entity {
void Awake () {
}
void Start () {
}
void Update () {
}
if(Input.GetKey(KeyCode.W) || Input.GetKey (KeyCode.UpArrow))
{
// Rigidbody2D.transform.position += Vector3.up * speed * Time.deltaTime;
}
if(Input.GetKey(KeyCode.S) || Input.GetKey (KeyCode.DownArrow))
{
// Rigidbody2D.transform.position += Vector3.down * speed * Time.deltaTime;
}
if(Input.GetKey(KeyCode.A) || Input.GetKey (KeyCode.LeftArrow))
{
// Rigidbody2D.transform.position += Vector3.left * speed * Time.deltaTime;
}
if(Input.GetKey(KeyCode.D) || Input.GetKey (KeyCode.RightArrow))
{
// Rigidbody2D.transform.position += Vector3.right * speed * Time.deltaTime;
}
}
}