Ejemplo n.º 1
0
 public void SelectedFormicant(Formicant formicant)
 {
     if (selectedFormicant != null)
     {
         selectedFormicant.Unselected();
     }
     selectedFormicant = formicant;
     _hud.UpdateUnitWindow(formicant);
 }
    public override void FinishOrder()
    {
        base.FinishOrder();

        Formicant newFormicant = ObjectManager.CreateFormicant(_subjectName, _delegation.DelegationRoyal.Position);

        // TODO Put in subject check??
        _delegation.AcceptSubject((Subject)newFormicant);
    }
Ejemplo n.º 3
0
    public override void FinishOrder()
    {
        base.FinishOrder();

        Formicant newFormicant = ObjectManager.CreateFormicant(_royalName, _delegation.DelegationRoyal.Position);

        // TODO Put in royal check??
        _targetDelegation.AcceptRoyal((Royal)newFormicant);
    }
Ejemplo n.º 4
0
 public void UnselectAll()
 {
     foreach (Queue <Formicant> queue in trackedMorphs.Values)
     {
         foreach (Formicant Formicant in queue)
         {
             Formicant.Unselected();
         }
     }
 }
Ejemplo n.º 5
0
    public Formicant CreateFormicant(string formicantName, Vector2 location)
    {
        Formicant newFormicant = Instantiate(GetFormicantPrefab(formicantName), location.ToVec3(-1), Quaternion.identity) as Formicant;

        if (newFormicant == null)
        {
            Debug.LogError("GameObjectList: Failed to instantiate new formicant");
            return(null);
        }

        return(newFormicant);
    }
Ejemplo n.º 6
0
    public void AddFormicant(Formicant form, int morph)
    {
        Queue <Formicant> morphQ;

        if (!trackedMorphs.TryGetValue(morph, out morphQ))
        {
            // Queue doesn't exist yet
            morphQ = new Queue <Formicant>();
            trackedMorphs.Add(morph, morphQ);
        }

        // Add to both queue and object heirachy
        morphQ.Enqueue(form);
        form.transform.parent = transform;
    }
Ejemplo n.º 7
0
 public void UpdateWindow(Formicant formicant)
 {
     if (formicant != null)
     {
         name.text         = "Name: " + formicant.name;
         state.text        = "State: " + formicant.State;
         canvasGroup.alpha = .75f;
     }
     else
     {
         canvasGroup.alpha = 0;
         name.text         = "Name: ";
         state.text        = "State: ";
     }
 }
Ejemplo n.º 8
0
 public void UpdateUnitWindow(Formicant formicant)
 {
     unitwindow.UpdateWindow(formicant);
 }