Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using CnControls;
public class Controller : MonoBehaviour
{
Vector3 position;
Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
void Update()
{
anim.Play("walk");
position = new Vector3(CnInputManager.GetAxis("Horizontal"), 0f, CnInputManager.GetAxis("Vertical"));
transform.position += position * Time.deltaTime;
}
}
using System.Collections.Generic;
using UnityEngine;
using CnControls;
public class Controller : MonoBehaviour
{
Vector3 position;
Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
void Update()
{
anim.Play("walk");
position = new Vector3(CnInputManager.GetAxis("Horizontal"), 0f, CnInputManager.GetAxis("Vertical"));
transform.position += position * Time.deltaTime;
}
}