Ejemplo n.º 1
0
 void Awake()
 {
     // DontDestroyOnLoad(gameObject);
     BaseEnemyScript baseEnemy = new BaseEnemyScript();
     //baseEnemy.CalculateEnemyInfo(2, 2, this, this.gameObject);
     //Debug.Log(PlayerHealth);
 }
Ejemplo n.º 2
0
    private void Die()
    {
        BaseEnemyScript EnemyScript = gameObject.GetComponent <BaseEnemyScript>();

        if (EnemyScript != null)
        {
            Debug.Log("Give experience to the most recent attacker");
            EnemyScript.Die();
        }
        else
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     delayForAttack = false;
     isRefreshed    = false;
     enemy          = gameObject.GetComponent <EnemyInformation>();
     baseEnemy      = gameObject.GetComponent <BaseEnemyScript>();
     //baseEnemy.CalculateEnemyInfo(2, 1);
     agent       = gameObject.GetComponent <NavMeshAgent>();
     player      = GameObject.FindGameObjectWithTag("Player");
     tele        = gameObject.GetComponent <TeleGrams>();
     isAttacking = false;
     orgLocation = Instantiate(new GameObject());
     orgLocation.transform.position = transform.position;
     isWaiting = false;
     orgPos    = projector.transform.localPosition;
 }