Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

namespace 'global::' already contains a definition for 'EnemyMovement'

$
0
0
I am making the survival game made by Unity at their 2014 convention, using Unity 4.6, and I am getting error CS0101: The namespace 'global::' already contains a definition for 'EnemyMovement'. My code is shown below using UnityEngine; using System.Collections; public class EnemyMovement : MonoBehaviour; { Transform player; //PlayerHealth playerHealth; //EnemyHealth enemyHealth; NavMeshAgent nav; void Awake () { player = GameObject.FindGameObjectWithTag ("Player").transform; //playerHealth = player.GetComponent (); //enemyHealth = GetComponent (); nav = GetComponent (); } void Update () { //if(enemyHealth.currentHealth > 0 && playerHealth.currentHealth > 0) //{ nav.SetDestination (player.position); //} //else //{ // nav.enabled = false; //} } }

Viewing all articles
Browse latest Browse all 398

Trending Articles



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