Exemple #1
0
 /// <summary>
 /// Called when entity is loaded into game. Adds event listeners
 /// </summary>
 public void OnEntityLoad()
 {
     GameManager.EventManager.AddListener(CombatAI);
     CombatAI.CheckEquiptment();
     CombatAI.SetEntity(Entity);
     TaskAI.SetEntity(Entity);
     //GameManager.EventManager.AddListener(TaskAI);
 }
Exemple #2
0
    public EntityPath EntityPath; //TODO - change back to private

    public EntityAI(Entity entity, EntityCombatAI combatAI, EntityTaskAI taskAI)
    {
        Debug.Log("Init EntityAI : " + entity);
        Entity   = entity;
        CombatAI = combatAI;
        TaskAI   = taskAI;
        if (!(entity is Player))
        {
            CombatAI.SetEntity(entity);
            TaskAI.SetEntity(entity);
        }
    }