public SearchTrackManager( SearchTrack searchTrack, List <GuardStateBrainPBT> guards, NodeSearchedSignal nodeSearchedSignal, GuardReachedRoomSignal guardReachedRoomSignal, SearchTrackSearchedSignal searchTrackSearchedSignal, List <SearchTrackNode> likelyNodes ) { _nodesToSearchIndex = 0; _coveringGuards = new List <GuardStateBrainPBT>(); _searchingGuards = new List <GuardStateBrainPBT>(); _allGuards = new List <GuardStateBrainPBT>(); _nodeSearchedSignal = nodeSearchedSignal; _guardReachedRoomSignal = guardReachedRoomSignal; _searchTrack = searchTrack; _assignedExitIndex = 0; _coveredExits = 0; SetUpDelegates(); // CheckIfReady(); _searchTrackSearchedSignal = searchTrackSearchedSignal; _guardsPerNode = new Dictionary <SearchTrackNode, GuardStateBrainPBT>(); if (likelyNodes != null) { _nodesToSearch = likelyNodes; } else { _nodesToSearch = searchTrack.GetSearchTrackNodes(); } if (searchTrack.GetSearchTrackNodes().Count == 0) { // _searchTrackSearchedSignal.Fire(searchTrack); RegisterComplete(); } else { Init(); AddGuards(guards); } }
public void Construct(GuardReportEnemyPresenceSignal guardReportEnemyPresenceSignal, GuardManager guardManager, GuardReachedRoomSignal guardReachedRoomSignal, NodeSearchedSignal nodeSearchedSignal, LevelLoadingManager levelLoadingManager, GuardReportDeadGuardSignal guardReportDeadGuardSignal ) { _guardReportEnemyPresenceSignal = guardReportEnemyPresenceSignal; _guardManager = guardManager; _guardReachedRoomSignal = guardReachedRoomSignal; _nodeSearchedSignal = nodeSearchedSignal; _levelLoadingManager = levelLoadingManager; _guardReportDeadGuardSignal = guardReportDeadGuardSignal; }
private void Init() { _nodeSearchedSignal += OnNodeSearched; _guardReachedRoomSignal += OnGuardReachRoom; }