当前位置: 首页>>代码示例>>C#>>正文


C# WorldState.setProperty方法代码示例

本文整理汇总了C#中WorldState.setProperty方法的典型用法代码示例。如果您正苦于以下问题:C# WorldState.setProperty方法的具体用法?C# WorldState.setProperty怎么用?C# WorldState.setProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WorldState的用法示例。


在下文中一共展示了WorldState.setProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildBlueFloorAction

    public BuildBlueFloorAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("blueResourceIsCollected", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("blueFloorIsBuilt", new WorldStateValue(true));
        postConditions.setProperty("blueResourceIsCollected", new WorldStateValue(false));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("Blue");

        this.actionName = "BuildBlueFloorAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:BuildBlueFloorAction.cs

示例2: AimAction

    public AimAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("enemyVisible", new WorldStateValue(true));
        preConditions.setProperty("weaponLoaded", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("enemyLinedUp", new WorldStateValue(true));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "AimAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:18,代码来源:AimAction.cs

示例3: AgentBuildPyramidAction

    public AgentBuildPyramidAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("stoneIsAvailable", new WorldStateValue(true));
        preConditions.setProperty("woodIsAvailable", new WorldStateValue(true));

        //preConditions.setProperty("houseIsBuilt", true);

        postConditions = new WorldState();
        postConditions.setProperty("pyramidIsBuilt", new WorldStateValue(true));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("SpecialAgent");

        this.actionName = "AgentBuildPyramidAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:19,代码来源:AgentBuildPyramidAction.cs

示例4: DetonateBombAction

    public DetonateBombAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("armedWithBomb", new WorldStateValue(true));
        preConditions.setProperty("nearEnemy", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("agentAlive", new WorldStateValue(false));
        postConditions.setProperty("enemyAlive", new WorldStateValue(false));

        cost = 6.0f;
        time = 6.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "DetonateBombAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:19,代码来源:DetonateBombAction.cs

示例5: BuildPurpleHouseAction

    public BuildPurpleHouseAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("blueResourceIsAvailable", new WorldStateValue(true));
        preConditions.setProperty("redResourceIsAvailable", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("purpleHouseIsBuilt", new WorldStateValue(true));
        postConditions.setProperty("blueResourceIsAvailable", new WorldStateValue(false));
        postConditions.setProperty("redResourceIsAvailable", new WorldStateValue(false));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("BlueBuilder&RedBuilder");
        agentTypes.Add("OrangeBuilder");

        this.actionName = "BuildPurpleHouseAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:20,代码来源:BuildPurpleHouseAction.cs

示例6: BuildGreenFactoryAction

    public BuildGreenFactoryAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("yellowResourceIsCollected", new WorldStateValue(true));
        preConditions.setProperty("blueResourceIsCollected", new WorldStateValue(true));
        //preConditions.setProperty("greenResourceIsAvailable", new WorldStateValue(false));

        postConditions = new WorldState();
        postConditions.setProperty("greenFactoryIsBuilt", new WorldStateValue(true));
        postConditions.setProperty("blueResourceIsCollected", new WorldStateValue(false));
        postConditions.setProperty("yellowResourceIsCollected", new WorldStateValue(false));
        postConditions.setProperty("greenResourceIsAvailable", new WorldStateValue(true));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("Blue&Yellow");

        this.actionName = "BuildGreenFactoryAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:21,代码来源:BuildGreenFactoryAction.cs

示例7: BuildBlackTowerAction

    public BuildBlackTowerAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("greenResourceIsCollected", new WorldStateValue(true));
        preConditions.setProperty("orangeResourceIsCollected", new WorldStateValue(true));
        preConditions.setProperty("magentaResourceIsCollected", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("blackTowerIsBuilt", new WorldStateValue(true));
        postConditions.setProperty("greenResourceIsCollected", new WorldStateValue(false));
        postConditions.setProperty("orangeResourceIsCollected", new WorldStateValue(false));
        postConditions.setProperty("magentaResourceIsCollected", new WorldStateValue(false));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("Yellow&Red&Blue");
        //agentTypes.Add("Yellow&Red");
        //agentTypes.Add("Yellow");

        this.actionName = "BuildBlackTowerAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:23,代码来源:BuildBlackTowerAction.cs

示例8: GetBlueAction

    public GetBlueAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("blueResourceIsAvailable", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("blueResourceIsCollected", new WorldStateValue(true));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("Blue");

        this.actionName = "GetBlueAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:16,代码来源:GetBlueAction.cs

示例9: ShootAction

    public ShootAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("enemyLinedUp", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("enemyAlive", new WorldStateValue(false));

        cost = 1.0f;
        time = 2.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "ShootAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:ShootAction.cs

示例10: ScoutAction

    public ScoutAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("armedWithGun", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("enemyVisible", new WorldStateValue(true));

        cost = 4.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "ScoutAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:ScoutAction.cs

示例11: LoadAction

    public LoadAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("armedWithGun", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("weaponLoaded", new WorldStateValue(true));

        cost = 1.0f;
        time = 1.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "LoadAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:LoadAction.cs

示例12: WalkAction

    public WalkAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("hasDestination", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("reachedDestination", new WorldStateValue(true));

        cost = 4.0f;
        time = 9.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "WalkAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:WalkAction.cs

示例13: ApproachAction

    public ApproachAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("enemyVisible", new WorldStateValue(true));

        postConditions = new WorldState();
        postConditions.setProperty("nearEnemy", new WorldStateValue(true));

        cost = 3.0f;
        time = 2.0f;

        agentTypes = new List<string>();
        agentTypes.Add("CommanderAgent");
        agentTypes.Add("Builder");

        this.actionName = "ApproachAction";
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:17,代码来源:ApproachAction.cs

示例14: GetStoneAction

    public GetStoneAction()
    {
        preConditions = new WorldState();
        preConditions.setProperty("stoneIsAvailable", new WorldStateValue(false));

        postConditions = new WorldState();
        postConditions.setProperty("stoneIsAvailable", new WorldStateValue(true));

        cost = 1.0f;
        time = 4.0f;

        agentTypes = new List<string>();
        agentTypes.Add("Builder");

        this.actionName = "GetStoneAction";

        isShareable = true;
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:18,代码来源:GetStoneAction.cs

示例15: OnTriggerEnter

    void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.tag == "Enemy")
        {

            Debug.Log ("ENEMY!!!!");

            WorldState currentWorldState = (WorldState)BlackBoard.Instance.GetFact(clan, "currentWorldState")[0].GetFactValue();

            currentWorldState.setProperty("enemyVisible", new WorldStateValue(true));

            WorldState goalWorldState = new WorldState();
            goalWorldState.setProperty("enemyAlive", new WorldStateValue(false));

            ((Agent)agentComponent).CreateNewPlan(currentWorldState, goalWorldState);

        }
    }
开发者ID:RikardGehlin,项目名称:Exjobb,代码行数:18,代码来源:EnemySensor.cs


注:本文中的WorldState.setProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。