// Update is called once per frame
    void Update()
    {
        /*if (!gameMasterControl.playerTurn ) {
         *  doFunction = true;
         * }*/

        if (!gameMasterControl.playerTurn && attackonlyOnce && ((int)gameMasterControl.positionIdentifier == (int)transform.position.x))
        {
            //TODO enemies turn to act, it needs to choose a character, choose an attack and choose a target
            // pass for now
            attackonlyOnce = false;
            Debug.Log("posIdentifier = " + (int)gameMasterControl.positionIdentifier);
            Debug.Log("enemy : " + (int)transform.localPosition.x + "attacks");
            StartCoroutine(delayMove());
        }

        if (gameMasterControl.displayDamageDealt)
        {
            enemyCurrentHP -= gameMasterControl.damageDealt;
            gameMasterControl.displayDamageDealt = false;
        }

        if (enemyCurrentHP <= 0 && doOnce)
        {
            Destroy(gameObject);
            Instantiate(deathEffect, gameObject.transform.localPosition, deathEffect.rotation);
            doOnce = false;
        }

        if (!gameMasterControl.playerTurn)
        {
            Debug.Log("EnemyHP : " + enemyCurrentHP);
            healthBar.updatehealthBar(enemyCurrentHP / 100);
        }
    }
 void Start()
 {
     startPos = transform.position;
     healthBar.updatehealthBar(1f);
 }