public void Update()
    {
        if (tacticalStateActive & plan != null && tacticalStateMachine.CurrentState != null)
        {
            tacticalStateMachine.CurrentState.Act();
            CheckPlan();
            tacticalStateMachine.Check();
        }
        if (ttm.GetResponse() == TargetTrackingManager.TResponses.SeekCover)
        {
            // Debug.Log("SHOULD SET KNOWLEDGE TO TRUE");
            startWS.SetValue(Atom.KnowledgeOfPlayer, true);
            if (currentGoal == goals[0])
            {
                GenerateAStarPlan();
            }
        }
        //Debug.Log(Atom.KnowledgeOfPlayer = true);
        if (ttm.GetResponse() == TargetTrackingManager.TResponses.EngageEnemy)
        {
            startWS.SetValue(Atom.CanSeePlayer, true);
            startWS.SetValue(Atom.KnowledgeOfPlayer, true);
            if (currentGoal == goals[0])
            {
                GenerateAStarPlan();
            }
        }

        if (ttm.GetResponse() == TargetTrackingManager.TResponses.DoNothing)
        {
            if (ttm.target == null)
            {
                startWS.SetValue(Atom.InRange, false);
                startWS.SetValue(Atom.CanSeePlayer, false);
                startWS.SetValue(Atom.KnowledgeOfPlayer, false);
                startWS.SetValue(Atom.PlayerDead, false);
                currentAction = actions[0];
                if (currentGoal != goals[0])
                {
                    GenerateAStarPlan();
                }
            }
        }


        senses.target = ttm.target;
        target        = ttm.target;
    }
    public void Update()
    {
        base.Update();
        if (tacticalStateActive & plan != null && tacticalStateMachine.CurrentState != null)
        {
            tacticalStateMachine.CurrentState.Act();
            CheckPlan();
            tacticalStateMachine.Check();
        }
        if (ttm.GetResponse() == TargetTrackingManager.TResponse.AttackEnemy) // ifthe AI can see the bear, manipulate the world state and re generate the plan
        {
            startWS.SetVal(Wstates.CanSeeBear, true);
            startWS.SetVal(Wstates.KnowledgeOfTree, false);

            GenerateAStarPlan();
        }
    }