public void Purchase_SimpleBehaviourEngine() { var itemUrl = "/Selenium-Testing-Cookbook-Gundecha-Unmesh/dp/1849515743"; var itemPrice = "40.49"; var clientPurchaseInfo = new ClientPurchaseInfo( new ClientAddressInfo() { FullName = "John Smith", Country = "United States", Address1 = "950 Avenue of the Americas", State = "New York", City = "New York City", Zip = "10001-2121", Phone = "00164644885569" }) { CouponCode = "99PERDIS" }; var clientLoginInfo = new ClientLoginInfo() { Email = "*****@*****.**", Password = "******" }; BehaviourExecutor.Execute( new ItemPageNavigationBehaviour(itemUrl), new ItemPageBuyBehaviour(), new PreviewShoppingCartPageProceedBehaviour(), new SignInPageLoginBehaviour(clientLoginInfo), new ShippingAddressPageFillShippingBehaviour(clientPurchaseInfo), new ShippingAddressPageFillDifferentBillingBehaviour(clientPurchaseInfo), new ShippingAddressPageContinueBehaviour(), new ShippingPaymentPageContinueBehaviour(), new PlaceOrderPageAssertFinalAmountsBehaviour(itemPrice)); }
private int boostAmmount; //the bonus added, and the amount that should be subtracted when the boost ends void Start() { heroStats = GetComponent <HeroStats>(); currentStatus = AbilityStatus.Cooldown; cooldownEnd = Time.time + cooldownTime; heroBehaviorExecutor = GetComponent <BehaviourExecutor>(); }
/// <summary> /// start game states execution /// </summary> private StateManager <GameState> InitializeGameStateMachine() { var executor = new BehaviourExecutor(true, null, "GameStateExecutor"); var stateMachine = new FiniteStateMachine(executor); var controller = new StateController <GameState>(); var gameStateFactory = new GameStatesFactory(controller); var stateManager = new StateManager <GameState>(controller, stateMachine, gameStateFactory, null); return(stateManager); }
private IStateManager <SimulationState> CreateStateManager() { //init level state machine var stateController = new StateController <SimulationState>(); var stateFactory = new SimulationStatesFactory(stateController, _unitFactory, _gui, _player, _worldData, _gameWorld); var executor = new BehaviourExecutor(false, null, "SimulationExecutor"); var stateMachine = new FiniteStateMachine(executor); var stateManager = new StateManager <SimulationState>(stateController, stateMachine, stateFactory); return(stateManager); }
public new void Initialize() { base.Initialize(); this.animator = this.GetComponent <Animator>(); damageFlowStarted = false; deadFlowStarted = false; IBehaviourTreeBuilder builder = new JimmyBehaviour(); behaviourExecutor = new BehaviourExecutor(builder.Build()); this.GetComponent <CombatUnit>().weaponPower = new WeaponPower( 100, new Vector3(2, 10, 0) ); }