public override void InitializeAgent() { base.InitializeAgent(); goalDetect = block.GetComponent <GoalDetect>(); goalDetect.agent = this; rayPer = GetComponent <RayPerception>(); localDifficulty = academy.difficulty; scanAgent = GetComponent <ScanAgent>(); SetActive(true); if (academy.useScan) { SetActive(false); scanAgent.SetActive(true); } else { scanAgent.SetActive(false); } // Cache the agent rigidbody agentRB = GetComponent <Rigidbody>(); // Cache the block rigidbody blockRB = block.GetComponent <Rigidbody>(); // Get the ground's bounds areaBounds = ground.GetComponent <Collider>().bounds; // Get the ground renderer so we can change the material when a goal is scored groundRenderer = ground.GetComponent <Renderer>(); // Starting material groundMaterial = groundRenderer.material; }
public void Setup() { _directoryMock = new Mock <IDirectory>(); _directoryInfoFactoryMock = new Mock <IDirectoryInfoFactory>(); _fileInfoFactoryMock = new Mock <IFileInfoFactory>(); _agent = new ScanAgent(_directoryMock.Object, _directoryInfoFactoryMock.Object, _fileInfoFactoryMock.Object); }
public static async Task Main(string[] args) { Console.WriteLine("Please enter directory to scan: "); var path = Console.ReadLine(); var agent = new ScanAgent(); var scanResult = await agent.ScanFolderAsync(path); Print(scanResult.Items); Console.WriteLine(); Console.WriteLine($"Total Files : {scanResult.TotalFiles}"); Console.WriteLine($"Total Size : {scanResult.TotalSize} bytes"); PrintErrors(scanResult.Errors); }