public void AddAutoRunBackgroundOrders() { //add background orders which should continously run RememberedDivision CommanderSendingOrder = new RememberedDivision(this); CommanderSendingOrder.SendOrderTo( new RememberedDivision(this), new UseSuppliesOrder(this, DivisionId), ref RememberedDivisions); }
public override void OnClickedInUI(Division Host, PlayerController playerController) { OrderDisplayManager.Instance.ClearOrders(); RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); CommanderSendingOrder.SendOrderTo( new RememberedDivision(Host), new GatherSuppliesOrder(Host, CommanderSendingOrderId), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }
public override void OnClickedInUI(Division Host, PlayerController playerController) { OrderDisplayManager.Instance.ClearOrders(); RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); //Debug.Log($"heartbeat {Host.DivisionId} {CommanderSendingOrderId}"); CommanderSendingOrder.SendOrderTo( new RememberedDivision(Host), new HeartBeatOrder(Host, CommanderSendingOrderId, CommanderSendingOrderId), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }
public void OnUnitSelected(Division Host, RememberedDivision division, PlayerController playerController) { RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); LocalPlayerController.Instance.UnRegisterUnitSelectCallback(UICallback); OrderDisplayManager.Instance.ClearOrders(); CommanderSendingOrder.SendOrderTo(new RememberedDivision(Host), new EngageOrder(Host, CommanderSendingOrder.DivisionId, division.DivisionId), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }
/// <summary> /// commit division to a zone /// </summary> /// <param name="Host"></param> /// <param name="playerController"></param> /// <param name="zone"></param> public virtual void OnZoneSelected(Division Host, PlayerController playerController, IZone zone) { RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); LocalPlayerController.Instance.UnRegisterZoneSelectCallback(UICallback); OrderDisplayManager.Instance.ClearOrders(); Debug.Log("zone" + " " + zone); Debug.Log($"{Host.Zones.Count}"); CommanderSendingOrder.SendOrderTo(new RememberedDivision(Host), new ZoneOrder(Host, CommanderSendingOrder.DivisionId, zone), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }
public void OnClickReturn(Vector3 mousePos, Division Host, PlayerController playerController) { finish = new Vector3(mousePos.x, mousePos.y); //InputController.Instance.UnRegisterOnClickCallBack(UICallback); //clear ui OrderDisplayManager.Instance.ClearOrders(); //need to get RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); CommanderSendingOrder.SendOrderTo(new RememberedDivision(Host), new Move(Host, CommanderSendingOrder.DivisionId, finish), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }
public override void OnClickedInUI(Division Host, PlayerController playerController) { if (Host.Soldiers.Count <= 1) { return; } var soldiersWanted = new Dictionary <SoldierType, int>(); soldiersWanted.Add(SoldierType.Melee, 1); OrderDisplayManager.Instance.ClearOrders(); RememberedDivision CommanderSendingOrder = GetRememberedDivisionFromHost(playerController.GeneralDivision.AttachedDivision, CommanderSendingOrderId); CommanderSendingOrder.SendOrderTo(new RememberedDivision(Host), new SplitDivision(Host, CommanderSendingOrderId, soldiersWanted), ref playerController.GeneralDivision.AttachedDivision.RememberedDivisions); }