//float timer = 10.0f;
    // Update is called once per frame
    void Update()
    {
        if (m_steering && m_movingEntity && m_entityVision)
        {
            if (m_movingEntity.isInTargetRange())
            {
                m_animInputController.doAttack();
                m_steering.setIsWandering(true);
                m_wanderTimer = m_delayBeforePursue;
                if (m_materialSwap)
                {
                    m_materialSwap.setDefaultMaterial();
                }
            }

            GameObject enemyObject = m_entityVision.GetClosestEnemy();
            if (m_steering && enemyObject)
            {
                m_wanderTimer -= Time.deltaTime;
                if (m_wanderTimer < 0)
                {
                    m_wanderTimer = -1;
                    m_steering.setPursuitTarget(true, enemyObject);
                    if (m_materialSwap)
                    {
                        m_materialSwap.setAltMaterial();
                    }
                }
            }
        }
    }
 public void attackStart()
 {
     if (m_movingEntity)
     {
         if (m_movingEntity.isInTargetRange())
         {
             GameObject targetObject = m_movingEntity.getTargetObject();
             if (targetObject)
             {
                 TakeDamage takeDamageComponent = targetObject.GetComponent <TakeDamage>();
                 if (takeDamageComponent)
                 {
                     takeDamageComponent.applyDamage();
                 }
             }
         }
     }
 }