2 using System.Collections;
3 using System.Collections.Generic;
21 private bool isFinished;
32 public override void Update(
float deltaTime)
34 if (isFinished) {
return; }
38 List<Client> matchingClients =
new List<Client>();
43 foreach (
Entity entity
in targets)
45 if (entity is
Character &&
GameMain.Server?.ConnectedClients.FirstOrDefault(c => c.Character == entity) is { } matchingCharacter)
47 matchingClients.Add(matchingCharacter);
59 campaign.Bank.Give(
Amount);
63 foreach (
Client client
in matchingClients)
65 campaign.GetWallet(client).Give(
Amount);
69 campaign.Wallet.Give(
Amount);
79 return $
"{ToolBox.GetDebugSymbol(isFinished)} {nameof(SetDataAction)} -> (Amount: {Amount.ColorizeObject()})";
readonly ScriptedEvent ParentEvent
static GameSession?? GameSession
Give or remove money from the crew or a specific character.
override string ToDebugString()
Rich test to display in debugdraw
override void Update(float deltaTime)
override bool IsFinished(ref string goTo)
Has the action finished.
MoneyAction(ScriptedEvent parentEvent, ContentXElement element)
readonly Identifier Identifier
IEnumerable< Entity > GetTargets(Identifier tag)