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); }
public override void FinishOrder() { base.FinishOrder(); Formicant newFormicant = ObjectManager.CreateFormicant(_royalName, _delegation.DelegationRoyal.Position); // TODO Put in royal check?? _targetDelegation.AcceptRoyal((Royal)newFormicant); }
public void UnselectAll() { foreach (Queue <Formicant> queue in trackedMorphs.Values) { foreach (Formicant Formicant in queue) { Formicant.Unselected(); } } }
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); }
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; }
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: "; } }
public void UpdateUnitWindow(Formicant formicant) { unitwindow.UpdateWindow(formicant); }