Exemplo n.º 1
0
    // Called when one of the player units die
    private void PlayerUnitDied(LivingEntity a_unit)
    {
        if (a_unit.CompareTag("LightningUnit"))
        {
            lightningDead = true;
        }

        if (a_unit.CompareTag("EarthUnit"))
        {
            earthDead = true;
        }
    }
Exemplo n.º 2
0
 public void OnUnitSelected(LivingEntity entity)
 {
     if (entity == null)
     {
         return;
     }
     if (entity.CompareTag(friendlyTag))
     {
         if (friendly != entity)
         {
             Debug.Log("Friendly Selected");
             friendly   = entity;
             controller = friendly.GetComponent <AgentController>();
         }
     }
 }