本文整理汇总了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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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";
}
示例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;
}
示例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);
}
}