using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class EnemyMovement : MonoBehaviour { Transform player; public UnityEngine.AI.NavMeshAgent nav; Rigidbody rb; public float enemyHpMax; //[HideInInspector] public float enemyHpCurrent; public Image enemyHealthBar; GameObject tmObject; TimeManager tm; public GameObject bttObject; BulletTimeTrigger btt; public GameObject deathEffect; void Awake () { enemyHpCurrent = enemyHpMax; player = GameObject.FindGameObjectWithTag ("Player").transform; tmObject= GameObject.FindGameObjectWithTag ("time_manager"); tm = tmObject.GetComponent<TimeManager> (); rb = GetComponent<Rigidbody> (); btt = bttObject.GetComponent<BulletTimeTrigger>(); } void Update () { if (nav != null) { nav.SetDestination (player.position); } if (enemyHpCurrent <= 0f) { Instantiate (deathEffect, transform.position, transform.rotation); btt.RemoveEnemy (gameObject); Destroy (gameObject); } } public void TriggeredOnPlayer(){ nav = GetComponent <UnityEngine.AI.NavMeshAgent> (); rb.isKinematic = false; } void OnCollisionEnter(Collision col){ if(col.gameObject.tag=="Player"){ //tm.enemyIsDead = true; Instantiate (deathEffect, transform.position, transform.rotation); btt.RemoveEnemy (gameObject); Destroy(gameObject); } } }
Standard input is empty
prog.cs(3,7): error CS0246: The type or namespace name `UnityEngine' could not be found. Are you missing an assembly reference? prog.cs(4,7): error CS0246: The type or namespace name `UnityEngine' could not be found. Are you missing an assembly reference? prog.cs(6,30): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference? prog.cs(8,2): error CS0246: The type or namespace name `Transform' could not be found. Are you missing an assembly reference? prog.cs(9,9): error CS0246: The type or namespace name `UnityEngine' could not be found. Are you missing an assembly reference? prog.cs(10,2): error CS0246: The type or namespace name `Rigidbody' could not be found. Are you missing an assembly reference? prog.cs(15,9): error CS0246: The type or namespace name `Image' could not be found. Are you missing `System.Drawing' using directive? prog.cs(17,2): error CS0246: The type or namespace name `GameObject' could not be found. Are you missing an assembly reference? prog.cs(18,2): error CS0246: The type or namespace name `TimeManager' could not be found. Are you missing an assembly reference? prog.cs(20,9): error CS0246: The type or namespace name `GameObject' could not be found. Are you missing an assembly reference? prog.cs(21,2): error CS0246: The type or namespace name `BulletTimeTrigger' could not be found. Are you missing an assembly reference? prog.cs(23,9): error CS0246: The type or namespace name `GameObject' could not be found. Are you missing an assembly reference? prog.cs(69,24): error CS0246: The type or namespace name `Collision' could not be found. Are you missing an assembly reference? Compilation failed: 13 error(s), 0 warnings
Standard output is empty