public void Init() { this._mockLocationStrategy = new Mock <IUpdateLocationStrategy>(); this._instructionPaser = new Mock <IInstructionParser>(); this._strategyFactory = new MovementStrategyFactory(this._mockLocationStrategy.Object, this._instructionPaser.Object); }
void Start() { Camera gameCamera = Camera.main; float xSpawnMin = gameCamera.ViewportToWorldPoint(new Vector3(0, 0, 0)).x + spawnXPadding; float xSpawnMax = gameCamera.ViewportToWorldPoint(new Vector3(1, 0, 0)).x - spawnXPadding; float ySpawnPos = gameCamera.ViewportToWorldPoint(new Vector3(0, 1, 0)).y; movementStrategyFactory = new MovementStrategyFactory(xSpawnMin, xSpawnMax, ySpawnPos); enemiesParent = GameObject.Find(PredefinedStrings.PARENT_OBJECT_ENEMY); if (!enemiesParent) { enemiesParent = new GameObject(PredefinedStrings.PARENT_OBJECT_ENEMY); } StartCoroutine(SpawnAllWaves()); }
public void Ctor_NoParameters_NoExceptionThrown() { this._strategyFactory = new MovementStrategyFactory(this._mockLocationStrategy.Object, this._instructionPaser.Object); }