void initialiseVars() { spawners = new List <ActorSpawnerController>(); actorPools = new List <ActorPoolController>(); timeBetweenStages = 0.5f; timeBetweenWaves = 2.5f; timeSinceLastStageChange = 0f; timeSinceTraderDeath = 0f; currentWave = 0; currentStageInWave = 1; isPlaying = true; spawnNewStage = false; preparingWave = true; waveCompositionGenerated = false; stageIsEmpty = false; newWave = true; waveComposition = new Dictionary <string, int>() { { "Damned", 0 }, { "Bat", 0 }, { "Bloater", 0 }, { "Jumper", 0 }, { "Shield", 0 } }; ui = GameObject.FindGameObjectWithTag("UI").GetComponent <UIController>(); trader = GameObject.FindGameObjectWithTag("Trader").GetComponent <TraderController>(); enemyPrefabs = new Dictionary <string, GameObject>() { { "Damned", (GameObject)Resources.Load("Damned") }, { "Bat", (GameObject)Resources.Load("Bat") }, { "Bloater", (GameObject)Resources.Load("Bloater") }, { "Jumper", (GameObject)Resources.Load("Jumper") }, { "Shield", (GameObject)Resources.Load("Shield") } }; }
// Use this for initialization void Awake() { mainPowerup = new PowerUp(); backupPowerup = new PowerUp(); trader = GameObject.FindGameObjectWithTag("Trader").GetComponent <TraderController>(); //mainPowerup.setType(powerupTypes[0]); //backupPowerup.setType(powerupTypes[0]); }
public async Task OrderStock_WithInvaidId_ReturnNotFound() { var mediator = new Mock<IMediator>(); var controller = new TraderController(); var response = await Task.FromResult(new BaseResponse<string>("sucesso")); mediator.Setup(m => m.Send(It.IsAny<GetTraderByIdQuery>(), It.IsAny<CancellationToken>())).ReturnsAsync(() => null); var result = await controller.GetTrader(1, mediator.Object); Assert.IsType<NotFoundResult>(result); }
public async Task GetTrader_AndReturnOk() { var mediator = new Mock<IMediator>(); var controller = new TraderController(); var response = await Task.FromResult(new BaseResponse<TraderResponse>( new TraderResponse { Name = "João", AccountAmmount = 1000, FinancialAssets = new List<FinancialAssetsResponse>() } )); mediator.Setup(m => m.Send(It.IsAny<GetTraderByIdQuery>(), It.IsAny<CancellationToken>())).ReturnsAsync(() => response); var result = await controller.GetTrader(1, mediator.Object); var okResult = Assert.IsType<OkObjectResult>(result); Assert.IsType<TraderResponse>(okResult.Value); }
// Use this for initialization void Start() { healthPoints = MAXHEALTH; timeSinceLastHealthLoss = 0f; invulnerabilityTime = 1f; points = 0; hasShot = false; isVerticalInput = false; isHorizontalInput = false; isMoving = false; isAlive = true; torso = transform.GetChild(0).gameObject; reticle = transform.GetChild(1).gameObject; legs = transform.GetChild(2).gameObject; torsoAnimator = torso.GetComponent <Animator>(); legsAnimator = legs.GetComponent <Animator>(); waveController = GameObject.FindGameObjectWithTag("Wave Manager").GetComponent <WaveController>(); trader = GameObject.FindGameObjectWithTag("Trader").GetComponent <TraderController>(); itemPool = GameObject.FindGameObjectWithTag("ItemPool").GetComponent <ItemPoolController>(); powerup = itemPool.getMainPowerup(); bulletPool = GameObject.FindGameObjectWithTag("BulletPool").GetComponent <BulletPoolController>(); speed = 800f; healthPoints = 3; rb2d = GetComponent <Rigidbody2D>(); uiObject = GameObject.FindGameObjectWithTag("UI"); ui = uiObject.GetComponent <UIController>(); deathMenuObject = GameObject.FindGameObjectWithTag("DeathMenu"); internalTimeScale = 1f; shootCooldownTime = 0.02f; timeSinceShot = shootCooldownTime; mainCam = Camera.main; transform.position = new Vector3(0, 0, 0); }
//BOT STARTING POINT public TarkovManager(StartupSettings config, EftApi api) { _config = config; //Create the Login Controller _loginController = new LoginController(_config, api); //Create the Profile Controller _profileController = new ProfileController(); //Create the Market Controller _marketController = new MarketController(_profileController); //Create the Trader Controller _traderController = new TraderController(); _botEndTime = DateTime.Now.AddHours(_hoursForBotToRestart); //Create a thread for a back-end task that the server will complete var botTask = new Task(StartTradingGrind); botTask.Start(); }
void Start() { parent = transform.parent.GetComponent <TraderController>(); type = gameObject.name; }