public void Evacuate() { MDebug.Log("^unit EVAC"); if (!GetOwner().Evacuate()) { ToastNotification.SetToastMessage2("Must be in Evacuation zone"); } }
public override bool CanExecAction(bool b) { if (GetLootableTiles().Count == 0) { if (b) { ToastNotification.SetToastMessage2("No Loot Nearby"); } return(false); } return(base.CanExecAction(b)); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.Alpha1)) { ToastNotification.SetToastMessage1("TOAST 111111!!!!"); } if (Input.GetKey(KeyCode.Alpha2)) { ToastNotification.SetToastMessage2("TOAST 22222!!!!"); } }
public static bool AddToSquad(Unlockable <TieredUnit> conf) { if (conf.IsUnlocked() && !Instance.selected_units.Contains(conf.Item) && Instance.selected_units.Count < Instance.GetMaxSquadsize()) { MDebug.Log("ADDING " + conf.Item.Tiers[0].Config.ID); Instance.selected_units.Add(conf.Item); Instance.OnSelectedUpdate.AttemptCall(Instance.selected_units); return(true); } SoundManager.PlayAtSourceTag("SoundSFXSource", "sfx_" + SoundManager.Presets.error); ToastNotification.SetToastMessage2("Squad is Full"); return(false); }
public bool HasRequirements(bool displayToast) { foreach (StatInfo s in GetRequirements()) { if (Owner.Stats.GetStatAmount(s.StatType) < s.Value) { if (displayToast) { MDebug.Log("^abilityNot enough " + UnitStats.StatToString(s.StatType)); ToastNotification.SetToastMessage2("Not enough " + UnitStats.StatToString(s.StatType)); } return(false); } } return(true); }
public void OnTileSelect(Tile selected_tile) { if (!GetLootableTiles().Contains(selected_tile)) { ToastNotification.SetToastMessage2("No Loot on this Tile"); return; } Tile_Loot loot = selected_tile.GetComponent <Tile_Loot>(); if (loot.GetLootableAmount(Owner) == 0) { ToastNotification.SetToastMessage2("Unit has no space for " + loot.GetLootableAmount(Owner) + "" + LootBalance.GetPlayerFacingString(loot.GetLootType()) + " "); return; } AttemptAction(selected_tile); }
public virtual bool CanExecAction(bool displayToast) { if (!Owner.Actions.HasAP(AP_Cost)) { if (displayToast) { ToastNotification.SetToastMessage2("Not enough AP"); } return(false); } if (!HasRequirements(displayToast)) { return(false); } if (ActionInProgress) { if (displayToast) { ToastNotification.SetToastMessage2("Other Action in Progress"); } return(false); } if (!ChargeController.HasCharges()) { if (displayToast) { ToastNotification.SetToastMessage2("Not Enough Charges"); } return(false); } if (BlockedByCamp()) { if (displayToast) { ToastNotification.SetToastMessage2("Can not use in Camp"); } return(false); } return(true); }