У меня проблема.Нашёл урок по воде(точнее про подводные эффекты).Так вот у меня выбивает куча ошибок одинаковых:
UCE ";" expected.
И ещё not found "="
А вот сам скрипт
Код
#pragma strict
var waterLevel : float;
var myParticles : ParticleSystem;
praivate var isUnderwater : bolean;
praivate var normalColor : Color;
praivate var underwaterColor : Color;
praivate var chMotor : CharacterMotor;
function Start ()
{
normalColor = new Color(0.5f, 0,5f, 0.5f, 0.5f);
underwaterColor = new Color(0.22f, 0.65f, 0.77f, 0.5f);
chMotor = GetComponent(CharacterMotor);
myParticles.Stop();
}
function Update ()
{
if ((transform.position.y < waterLevel) ! = isUnderwater)
{
isUnderwater = transform.position.y <waterLevel;
if(isUnderwater)SetUnderwater();
if(!isUnderwater)SetNormal;
}
if(isUnderwater && Input.GetKey(KeyCode.E))
{
constantForce.relativeForce = Vector3(0, 0, 0);
}
if(isUnderwater && Input.GetKey(KeyCode.Q))
{
constantForce.relativeForce = Vector3(0, 200, 0);
}
}
function SetNormal()
{
RenderSettings.fogColor = normalColor;
RenderSettings.fogDensity = 0.5f;
}
function SetUnderwater()
{
RenderSettings.fogColor = underwaterColor;
RenderSettings.fogDensity = 0.03f;
chMotor.movement.gravity = 0.03f;
chMotor.movement.maxFallSpeed = 5;
chMotor.movement.maxForwardSpeed = 4;
chMotor.movement.maxSidewaysSpeed = 4;
myParticles.Play();
}