Exemplo n.º 1
0
 public PlaceCommand(string command, string desc, ConditionCheck check, Execution execute)
 {
     this.command = command;
     this.desc    = desc;
     this.check   = check;
     this.execute = execute;
 }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
    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();
    }
Exemplo n.º 4
0
 //--- 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));
 }
Exemplo n.º 5
0
 public void Clear()
 {
     ConditionCheck.InitParmeter();
 }
Exemplo n.º 6
0
 /// <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;
 }