public PlaceCommand(string command, string desc, ConditionCheck check, Execution execute) { this.command = command; this.desc = desc; this.check = check; this.execute = execute; }
private static void WriteConditionCheck(Utf8JsonWriter writer, ConditionCheck conditionCheck) { writer.WritePropertyName("ConditionCheck"); writer.WriteStartObject(); if (conditionCheck.ConditionExpression != null) { writer.WriteString("ConditionExpression", conditionCheck.ConditionExpression); } if (conditionCheck.ExpressionAttributeNames != null) { writer.WriteExpressionAttributeNames(conditionCheck.ExpressionAttributeNames); } if (conditionCheck.ExpressionAttributeValues != null) { writer.WriteExpressionAttributeValues(conditionCheck.ExpressionAttributeValues); } if (conditionCheck.Key != null) { writer.WritePrimaryKey(conditionCheck.Key); } if (conditionCheck.ReturnValuesOnConditionCheckFailure != ReturnValuesOnConditionCheckFailure.None) { writer.WriteReturnValuesOnConditionCheckFailure(conditionCheck.ReturnValuesOnConditionCheckFailure); } writer.WriteEndObject(); }
void Start() { idolCreator.Init(); npcCreator.Init(); ConditionCheck cc = Global.GetComponent <ConditionCheck>(); cc.condition = () => { //Show.Log("checking victory " + Global.Get<Team>().members.Count + " / " + (npcs.Count + 1)); return(Global.GetComponent <Team>().members.Count >= npcCreator.npcs.Count + 1); }; cc.action = () => { Tokenizer tok = new Tokenizer(); DialogManager.Instance.StartDialog(this, tok, "win message"); tok.ShowErrorTo(DialogManager.ActiveDialog.ShowError); DialogManager.Instance.Show(); }; //Show.Log("finished initializing " + this); Team team = Global.GetComponent <Team>(); team.AddMember(firstPlayer); EnsureExplorer(firstPlayer); maze.stage = -1; GenerateNext(); }
//--- Constructors --- public DynamoTableTransactWriteItemsConditionCheck(DynamoTableTransactWriteItems parent, ConditionCheck conditionCheck, DynamoRequestConverter converter) { _parent = parent ?? throw new ArgumentNullException(nameof(parent)); _conditionCheck = conditionCheck ?? throw new ArgumentNullException(nameof(conditionCheck)); _converter = converter ?? throw new ArgumentNullException(nameof(converter)); }
public void Clear() { ConditionCheck.InitParmeter(); }
/// <summary> /// Creates a new condition checking node. /// </summary> public Condition(ConditionCheck <M> satisfaction) : base() // This node can not decorate anything and it is also a terminal node { sat = satisfaction; return; }