// Use this for initialization
    void Start()
    {
        m_rb      = gameObject.GetComponent <Rigidbody2D>();
        m_tm      = new TimeoutEventManager();
        m_actions = new PriorityList();

        m_renderer = gameObject.GetComponent <SpriteRenderer>();

        m_im = new IntervalEventManager();

        m_im.addListener(HFlineFollowCONFIG.CreatureDecisionLatency, () =>
        {
            m_actions.flush();
            //Flush actions, set neew behaviours
            set_behaviour_samples++;
            setBehaviours();
        });

        // m_im.addListener(2f, () =>
        // {
        //   // Debug.Log("Fit: " + fit_samples + ", Beh: " + set_behaviour_samples);
        //   fit_samples = 0;
        //   set_behaviour_samples = 0;
        // });

        m_im.addListener(1f, () => {
            m_health.add(-1f);
        });

        m_im.addListener(HFlineFollowCONFIG.CreatureFitnessLatency, fitnessUpdate);
    }
    public void Initalize(Vector2 p_direction, float p_damage, GameObject p_shooter)
    {
        m_rb = gameObject.GetComponent <Rigidbody2D>();

        m_standard_velocity = p_direction * m_speed;
        m_damage            = p_damage;
        m_shooter           = p_shooter;

        ObjectLogger.log(gameObject, "BULLET");

        m_timeout = new TimeoutEventManager();

        m_timeout.addTimeout(2f, () => { ObjectLogger.unlog(gameObject, "BULLET"); Destroy(gameObject); });
    }
    //Goal


    //----------------------------------------------------------
    //Unity Callbacks

    // Use this for initialization
    void Start()
    {
        m_rb              = gameObject.GetComponent <Rigidbody2D>();
        m_renderer        = gameObject.GetComponent <SpriteRenderer>();
        m_tm              = new TimeoutEventManager();
        m_im              = new IntervalEventManager();
        m_actions         = new PriorityList();
        m_cooldowns       = new CooldownLogger();
        m_sense_angle     = 30f;
        m_sense_proximity = 6f;
        m_brain_stop      = false;

        m_cooldowns.activate("SENSE", 0);

        m_im.addListener(0.1f, () => {
            m_decision_time = true;
        });
    }