This is the Script:
using UnityEngine;
using System.Collections;
public class Ducken : MonoBehaviour {
var tongle = 0; var localScale ; Vector3 : //var JumpSpeed = 100.0f;
function Start () {
Screen.showCursor = false; }
function Update () {
if (tongle == 0){ if
(Input.GetKeyDown
(KeyCode.LeftControl)) {
transform.localScale +=
Vector3(0.0,-1,0); tongle = 1;
} return; }
if (tongle == 1){ if
(Input.GetKeyDown
(KeyCode.LeftControl)) {
transform.position.y += 0.5;
transform.localScale +=
Vector3(0.0,1,0); tongle = 0;
} return; }
}
}
In Unity it says:
Assets/Ducken.cs(6,42): error CS1519: Unexpected symbol `:’ in class, struct, or interface member declaration
But i cant find anything wrong in Line 6, hope you can help me!