void Awake()
    {
        _pheromoneManager   = (PheromoneManager)Object.FindObjectOfType(typeof(PheromoneManager));
        _agentConfiguration = FindObjectOfType(typeof(GlobalAgentConfiguration)) as GlobalAgentConfiguration;

        _type = EPheromoneTypes.Food;
    }
    void Awake()
    {
        _navHelper = GetComponent <NavAgentHelper> ();
        _states    = GetComponent <AgentStates> ();

        // Create dicts and sets for newarby pheromones.
        _nearbyPheromones = new Dictionary <EPheromoneTypes, HashSet <Pheromone> >();
        _nearbyPheromones [EPheromoneTypes.Food]      = new HashSet <Pheromone> ();
        _nearbyPheromones [EPheromoneTypes.Attack]    = new HashSet <Pheromone> ();
        _nearbyPheromones [EPheromoneTypes.Repellant] = new HashSet <Pheromone> ();

        _agentConfiguration = FindObjectOfType(typeof(GlobalAgentConfiguration)) as GlobalAgentConfiguration;
    }
 void Awake()
 {
     _agentConfiguration = FindObjectOfType(typeof(GlobalAgentConfiguration)) as GlobalAgentConfiguration;
 }
Beispiel #4
0
 void Awake()
 {
     _agentConfiguration = FindObjectOfType(typeof(GlobalAgentConfiguration)) as GlobalAgentConfiguration;
     _statisticsManager  = FindObjectOfType <StatisticsManager>();
 }