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

Hi, getting error cs1041 in my code:identifier expected, "this" is a keyword; need solution please

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; public class recurso : MonoBehaviour { int id; bool dentrodelradio; public bool apuntando; void OnTriggerEnter(Collider other){ if (other.gameObject.name == "recurso") dentrodelradio = true; else dentrodelradio = false; } // Use this for initialization void Start () { if (this.gameObject.CompareTag("arbol")) { int id = 1; } else if (this.gameObject.CompareTag("carne")) { int id = 2; } } // Update is called once per frame void Update () { if (dentrodelradio){ switch(id){ case 1: transform.this.gameObject.tag = "arbolactivo"; case 2: transform.this.gameObject.tag = "carneactivo"; } if (apuntando){ if (Input.GetMouseButton(0)){ //ir cambiando la textura con un time delta time y un switch. } } } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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