(да ошибок не было! но код не работал и куб стоял на месте :)))
using UnityEngine;
using System.Collections;
public class Move : MonoBehaviour
{ // Единственная скобка, которой не хватало
public GameObject player;
public int speedRotation = 3;
public int speed = 5;
public AnimationClip anima;
public int jumpSpeed = 50;
void Start()
{
player = (GameObject)this.gameObject;
animation.AddClip(anima, "animCube");
}
void Update()
{
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow))
{
player.transform.position += player.transform.forward * speed * Time.deltaTime;
animation.CrossFade("animCube");
}
if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow))
{
player.transform.position -= player.transform.forward * speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow))
{
player.transform.Rotate(Vector3.down * speedRotation);
}
if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow))
{
player.transform.Rotate(Vector3.up * speedRotation);
}
if (Input.GetKeyDown(KeyCode.Space))
{
player.transform.position += player.transform.up * jumpSpeed * Time.deltaTime;
}
}
}
может я и не внимателен
Во-вторых, про скобку, я её убрал и ставил много раз, пробовал свои варианты но нечего не помогло.
Боюсь попасть на шлак
Яндекс явно мимо с его 2к+ в месяц.
Вообще, на таких масштабах монга ощущается, как какой-то оверкилл.