Example #1
0
    // Use this for initialization
    void Start()
    {
        //_move = GetComponent<CharacterController>();
        //print(GameObject.FindGameObjectWithTag("InfluenceMapControl"));
        _map = GameObject.FindGameObjectWithTag("InfluenceMapControl").GetComponent <InfluenceMapControl>();
        _map.RegisterPropagator(this);
        _map.GetMovementLimits(out _bottomLeft, out _topRight);

        //InvokeRepeating("ChooseNewDestination", 0.001f, 3.0f);
    }
Example #2
0
    void InstallInfluenceMap(InfluenceMapControl im, int idx)
    {
        im._bottomLeft = bottomLeft;
        im._upperRight = upperRight;
        im._gridSize   = gridSize;

        im._decay           = lowLevelMaps[idx].decay;
        im._momentum        = lowLevelMaps[idx].momentum;
        im._updateFrequency = lowLevelMaps[idx].updateFreq;

        im.StartWork();
    }