public void Submit() { AmbitionApp.SendMessage(PartyMessages.SHOW_ROOM, _incident?.ID); Close(); }
public override void OnEnterState() { AmbitionApp.SendMessage(_messageID); }
override public void OnEnterState() { AmbitionApp.Subscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete); AmbitionApp.SendMessage(GameMessages.FADE_OUT); }
public void Execute(CommodityVO reward) { AmbitionApp.SendMessage(ParisMessages.ADD_LOCATION, reward.ID); }
public void Decline() { AmbitionApp.SendMessage(PartyMessages.DECLINE_INVITATION, _rendezvous); SetText(RSVP.Declined, _rendezvous.IsCaller); }
public override void OnEnter() { AmbitionApp.SendMessage(PartyMessages.TURN, ++AmbitionApp.GetModel <PartyModel>().Turn); }
public override void OnEnter() { PartyModel model = AmbitionApp.GetModel <PartyModel>(); IncidentVO[] incidents = new IncidentVO[model.NumRooms]; IncidentModel story = AmbitionApp.Story; if (model.Incidents != null) { incidents = new IncidentVO[model.NumRooms]; for (int i = model.NumRooms - 1; i >= 0; --i) { incidents[i] = story.GetIncident(model.Incidents[i]); } } else { HashSet <string> characters = new HashSet <string>(); if (model.RequiredIncident != null) { int index = RNG.Generate(model.NumRooms); incidents[index] = story.GetIncident(model.RequiredIncident); } else { List <IncidentVO> result = new List <IncidentVO>(); IncidentVO incident; if (model.Party.SupplementalIncidents != null) { string[] shuffle = RNG.Shuffle(model.Party.SupplementalIncidents); foreach (string incidentID in shuffle) { incident = story.GetIncident(incidentID); if (result.Count < model.NumRooms) { if (FindCharacters(incident, characters)) { result.Add(incident); } } } } if (result.Count < model.NumRooms) { incidents = story.GetIncidents(IncidentType.Party); incidents = RNG.Shuffle(incidents); foreach (IncidentVO rand in incidents) { if (AmbitionApp.CheckIncidentEligible(rand) && (rand.Factions?.Length == 0 || Array.IndexOf(rand.Factions, model.Party.Faction) >= 0) && FindCharacters(rand, characters)) { result.Add(rand); } if (result.Count >= model.NumRooms) { break; } } } while (result.Count < model.NumRooms) { result.Add(null); } incidents = RNG.Shuffle(result); } model.Incidents = new string[model.NumRooms]; for (int i = model.NumRooms - 1; i >= 0; --i) { model.Incidents[i] = incidents[i]?.ID; } } AmbitionApp.SendMessage(PartyMessages.SELECT_INCIDENTS, incidents); string title = AmbitionApp.Localize(PartyConstants.PARTY_NAME + model.Party.ID); if (string.IsNullOrEmpty(title)) { title = PartyConstants.PARTY_REASON + model.Party.Faction.ToString().ToLower() + "." + model.Party.phrases[0]; } AmbitionApp.SendMessage(GameMessages.SHOW_HEADER, title); }
private void HandleButton() { AmbitionApp.SendMessage(TutorialMessages.TUTORIAL_NEXT_STEP); }
public void Execute() { AmbitionApp.GetModel <GameModel>().Exhaustion = 0; AmbitionApp.SendMessage(CalendarMessages.NEXT_DAY); }
public void MouseClick() { MouseHover(); AmbitionApp.SendMessage(InventoryMessages.SORT_INVENTORY, _labelString); }
// Use this for initialization void Start() { AmbitionApp.SendMessage(GameMessages.FADE_IN); Destroy(this); }
// Use this for initialization void Awake() { AmbitionApp.SendMessage(AudioMessages.PLAY_AMBIENT, AmbientSFX); }
public void OnPointerEnter(PointerEventData eventData) { AmbitionApp.SendMessage <CharacterVO>(PartyMessages.TARGET_GUEST, Guest); }
public void Execute() { AmbitionApp.SendMessage(AmbitionApp.Inventory.Inventory); }
public void HandleClick() { DateTime today = AmbitionApp.GetModel <CalendarModel>().Today; AmbitionApp.SendMessage <DateTime>(CalendarMessages.VIEW_MONTH, today); }
public void Execute(GuestVO guest) { if (guest.IsLockedIn) { return; // Don't bother if the guest is already locked in } PartyModel partyModel = AmbitionApp.GetModel <PartyModel>(); ConversationModel model = AmbitionApp.GetModel <ConversationModel>(); RemarkVO remark = model.Remark; float levelBonus = (AmbitionApp.GetModel <GameModel>().Level >= 4) ? 1.25f : 1.0f; float ReparteBonus = 1.0f + (model.Repartee ? AmbitionApp.GetModel <PartyModel>().ReparteeBonus : 0f); // Determine reaction to remark string key = remark.Interest == guest.Like ? PartyConstants.LIKE : remark.Interest == guest.Dislike ? PartyConstants.DISLIKE : PartyConstants.NEUTRAL; if (key == PartyConstants.DISLIKE && model.ItemEffect) { model.ItemEffect = false; return; } // Adjust guest according to configued reaction RemarkResult result = partyModel.RemarkResults[key]; int opinionDelta = (int)(((float)RNG.Generate(result.OpinionMin, result.OpinionMax)) * ReparteBonus * levelBonus); guest.Opinion += opinionDelta; if (guest.Opinion >= 100) { AmbitionApp.SendMessage(PartyMessages.GUEST_CHARMED, guest); } else if (guest.Opinion <= 0) { AmbitionApp.SendMessage(PartyMessages.GUEST_OFFENDED, guest); } else { switch (key) { case PartyConstants.LIKE: guest.State = GuestState.Interested; AmbitionApp.SendMessage(PartyMessages.GUEST_REACTION_POSITIVE, guest); AmbitionApp.SendMessage(PartyMessages.FREE_REMARK); break; case PartyConstants.DISLIKE: AmbitionApp.SendMessage(PartyMessages.GUEST_REACTION_NEGATIVE, guest); guest.State = GuestState.Bored; break; default: guest.State = GuestState.Interested; AmbitionApp.SendMessage(PartyMessages.GUEST_REACTION_NEUTRAL, guest); break; } } // So, there's a potential that the clock won't reset? Deal with that when it's a thing AmbitionApp.SendMessage(result.Remarks < 0 ? PartyMessages.BURN_REMARKS : PartyMessages.RESHUFFLE_REMARKS, Math.Abs(result.Remarks)); }
public override void OnClose() { AmbitionApp.SendMessage <string>(GameMessages.DIALOG_CLOSED, ID); }
public override void OnEnter() => AmbitionApp.SendMessage(GameMessages.FADE_OUT);
public void ResetGame() { AmbitionApp.OpenDialog("exit", () => AmbitionApp.SendMessage(GameMessages.EXIT_GAME)); }
private void OnActivate() { AmbitionApp.SendMessage(GameMessages.FADE_IN); Activate(); }
public void Execute() { CommodityVO penalty = new CommodityVO(CommodityType.Credibility, AmbitionApp.Game.ExhaustionPenalty); AmbitionApp.SendMessage(penalty); }
public void OnPointerExit(PointerEventData eventData) { AmbitionApp.SendMessage <GuestVO>(PartyMessages.TARGET_GUEST, null); }
public void Accept() { AmbitionApp.SendMessage(PartyMessages.ACCEPT_INVITATION, _rendezvous); SetText(RSVP.Accepted, _rendezvous.IsCaller); }
public void OnPointerClick(PointerEventData eventData) { AmbitionApp.SendMessage(PartyMessages.SELECT_GUEST, Guest); }
protected void OnClick() { AmbitionApp.SendMessage(MapMessage.GO_TO_ROOM, _room); }
private void OnClick() => AmbitionApp.SendMessage(PartyMessages.START_PARTY);
public void Execute(ItemVO item) { AmbitionApp.Inventory.Inventory.Remove(item); AmbitionApp.SendMessage(InventoryMessages.ITEM_DELETED, item); AmbitionApp.Inventory.Broadcast(); }
public void OnPointerClick(PointerEventData eventData) { AmbitionApp.SendMessage(IncidentMessages.TRANSITION, _transition); }
private void HandleFadeOutComplete() { AmbitionApp.Unsubscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete); AmbitionApp.SendMessage <string>(GameMessages.LOAD_SCENE, _sceneID); AmbitionApp.SendMessage(GameMessages.FADE_IN); }
private void OnApplicationQuit() { AmbitionApp.SendMessage(GameMessages.AUTOSAVE); }