Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

I get error code CS0116 and I can't find the solution. Can you help me?

$
0
0
using UnityEngine; using System.Collections; public class PlayerControll : MonoBehaviour { public float speed; // Use this for initialization void Start (){ count=0; CountText(); } // Update is called once per frame void Update () { } void FixedUpdate () { Vector3 movement = new Vector3(moveHorizontal,0.0f,moveVertical); rigidbody.AddForce(movement * speed * Time.deltaTime); float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical"); } } private int count; public GUIText countText; void OnTriggerEnter(Collider other){ if (other.gameObject.tag == item) {other.gameObject.SetActive(false); count=count+1; CountText();} } void CountText(){ countText.text="Count: " + count.ToString(); }

Viewing all articles
Browse latest Browse all 7934

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>