private void OnSearchSessionEnded(SearchSession session)
        {
            if (session.isSearchSuccessed)
            {
                searchCounter++;
                lastSearchRoomId = session.roomId;

                RavenhillEvents.OnSearchCounterChanged(searchCounter);
            }
        }
Esempio n. 2
0
        public override void Start()
        {
            base.Start();

            SearchSession session = ravenhillGameModeService.searchSession;

            StartSearch(session.roomInfo.currentRoomSetting.searchObjectCount);
            engine.GetService <IViewService>().ShowView(RavenhillViewType.search_pan, session);

            if (ravenhillGameModeService.searchSession.searchMode == SearchMode.Night)
            {
                GameObject spotInstance = Instantiate <GameObject>(resourceService.GetCachedPrefab("spot"), new Vector3(0, 0, -30), Quaternion.identity);
            }
        }
Esempio n. 3
0
        public override bool Execute(string source)
        {
            bool          success = GetBool(source, 1);
            SearchSession session = null;

            session = new SearchSession();

            session.SetRoomInfo(new RoomInfo("r4"));

            var bonuses = resourceService.bonusList.Select(b => new Data.InventoryItem(b, 1)).ToList();

            engine.GetService <IDebugService>().AddMessage($"bonus count {bonuses.Count}", ColorType.yellow);
            session.OnEndSession(success ? SearchStatus.success : SearchStatus.fail, 60, bonuses);
            viewService.ShowView(RavenhillViewType.exit_room_view, session);
            return(true);
        }
        private void ApplySessionResults(SearchSession session)
        {
            if (session.searchStatus == SearchStatus.success)
            {
                List <DropItem> dropItems = new List <DropItem> {
                    new DropItem(DropType.silver, GetModifiedSilverCount(session.roomId, session.roomData.silverReward)),
                    new DropItem(DropType.exp, GetModifiedExpCount(session.roomId, session.roomData.expReward))
                };
                foreach (InventoryItem item in session.roomDropList)
                {
                    dropItems.Add(new DropItem(DropType.item, 1, item.data));
                }

                engine.Cast <RavenhillEngine>().DropItems(dropItems, null, () => {
                    return((gameModeName == GameModeName.map || gameModeName == GameModeName.hallway) &&
                           (!viewService.hasModals) && (viewService.ExistView(RavenhillViewType.hud)));
                });

                roomManager.AddProgress(session.roomId);
                roomManager.RollSearchMode(session.roomId);
            }
        }
Esempio n. 5
0
 private void OnSearchSessionStarted(SearchSession session)
 {
     LoadScene(session.roomId);
 }
Esempio n. 6
0
 public static void OnSearchSessionStarted(SearchSession session)
 {
     SearchSessionStarted?.Invoke(session);
 }