private void OnClickGain(EventContext context) { Hide(); AdventureFacade.getInstance().MeetNpc(); m_TileController.MeetNpc(); AudioManager.inst.PlayAudioEffect("GainBox"); }
public static AdventureFacade getInstance() { if (Inst == null) { Inst = new AdventureFacade(); } return(Inst); }
public ActionResult ChooseUnitsPost(AdventuresChooseUnitsModel model) { List <UnitDTO> units = new List <UnitDTO>(UnitFacade.ListUnitsByVillage(model.VillageID)); for (int i = 0; i < units.Count(); ++i) { units[i].Count = model.UnitsCount[i]; } if (ModelState.IsValid) { AdventureFacade.Adventure(units, model.AdventureTypeId);//esteze okej cakaj } return(RedirectToAction("Index", "Adventures", new { id = model.VillageID })); }
// GET: Adventures public ActionResult Index(int id) { if (!BuildingFacade.GetBuildingByNameAndVillageId("Tavern", id).Built) { return(RedirectToAction("VisitVillage", "Villages", new { id = id })); } var result1 = new List <AdventureDTO>(AdventureFacade.ListAdventures(id)); var result2 = new List <UnitDTO>(UnitFacade.ListUnitsByVillage(id)); var model = new AdventureListViewModel() { Adventures = result1, Units = result2, VillageID = id }; return(View("AdventureListView", model)); }
private void OnClickExit(EventContext context) { Hide(); AppFacade.getInstance().EnterGameScene(); AdventureFacade.getInstance().FinishAdventure(); }
private void OnClickStart(EventContext context) { AdventureFacade.getInstance().StartAdventure(m_SelectedPupilId); AppFacade.getInstance().EnterAdventureScene(m_SelectedPupilId); }