Exemplo n.º 1
0
    void Start()
    {
        defaultColor = new Color(0, 1, 1, 1);
        GetComponent <SpriteRenderer>().color = defaultColor;

        agentPathfinding    = gameObject.GetComponent("NavMeshAgentPath") as NavMeshAgentPath;
        agentActionsHandler = new AgentActionsHandler(agentPathfinding, agentResources);

        agentsManager = transform.parent.gameObject;

        ResetToDefaultValues();

        dateBorn = (agentsManager.GetComponent("TimeDistribution") as TimeDistribution).DaysPassed;

        SetRandomAge();
    }
Exemplo n.º 2
0
 internal AgentActionsHandler(NavMeshAgentPath agentPathfinding, AgentResourcesManager agentResources)
 {
     this.agentPathfinding = agentPathfinding;
     this.agentResources   = agentResources;
 }