Текст ошибки:
Assets/scripts/shooter.cs(10,64): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Вот скрипт:
Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class shooter : MonoBehaviour {
public float maxSpeed = 13f;
private float move = 0;
public bool isFacing = true;
public void FixedUpdate()
{
GetComponent<SheenaController> ().isFacingRight;
if (isFacingRight == true) {
move = 1;
} else {
move = -1;
}
GetComponent<Rigidbody2D>().velocity = new Vector2 (move * maxSpeed, GetComponent<Rigidbody2D>().velocity.y);
}
}
using System.Collections;
public class shooter : MonoBehaviour {
public float maxSpeed = 13f;
private float move = 0;
public bool isFacing = true;
public void FixedUpdate()
{
GetComponent<SheenaController> ().isFacingRight;
if (isFacingRight == true) {
move = 1;
} else {
move = -1;
}
GetComponent<Rigidbody2D>().velocity = new Vector2 (move * maxSpeed, GetComponent<Rigidbody2D>().velocity.y);
}
}
Подскажите в чём ошибка?
Заранее всем спасибо!))