using Unity.
VisualScripting;
using UnityEngine;
public class Mover : MonoBehaviour
{
// Start is called once before the first execution of Update after the
MonoBehaviour is created
[SerializeField] float moveSpeed = 10f;
void Start()
{
Rules();
// Update is called once per frame
void Update()
{
Controller();
}
void Rules ()
{
Debug.Log("Welcome to the Game");
Debug.Log("Use W,A,S,D to control the Player");
Debug.Log("If you go out of the Wall you Lose");
void Controller()
{
float Xaxis = Input.GetAxis("Horizontal") * Time.deltaTime * moveSpeed;
float Yaxis = 0.0f;
float Zaxis = Input.GetAxis("Vertical") * Time.deltaTime * moveSpeed;
transform.Translate(Xaxis, Yaxis, Zaxis);