public void Execute(CommodityVO reward) { AmbitionApp.GetModel <GameModel>().Livre += reward.Value; }
public void Execute(string location) { AmbitionApp.GetModel <ParisModel>().Locations.Remove(location); }
public void Initialize(string dialogID) { _dialogID = dialogID; AmbitionApp.Subscribe <string>(GameMessages.DIALOG_CLOSED, HandleDialog); }
public void Submit() { AmbitionApp.GetModel <CharacterModel>().CreateRendezvous = _rendez; AmbitionApp.SendMessage(RendezvousMessages.CHOOSE_RENDEZVOUS); Close(); }
public override void OnEnterState() { ParisModel paris = AmbitionApp.GetModel <ParisModel>(); AmbitionApp.SendMessage(GameMessages.LOAD_SCENE, paris.Location.Scene); }
public override void OnEnterState() { AmbitionApp.SendMessage(_messageID); }
override public void OnEnterState() { AmbitionApp.Subscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete); AmbitionApp.SendMessage(GameMessages.FADE_OUT); }
public IncidentTutorialOptionsInput() { AmbitionApp.Subscribe <TransitionVO[]>(CheckMomentDecision); }
public void Dispose() { AmbitionApp.Unsubscribe <TransitionVO[]>(CheckMomentDecision); }
public void Execute(CommodityVO reward) { AmbitionApp.SendMessage(ParisMessages.ADD_LOCATION, reward.ID); }
private void OnDisable() => AmbitionApp.Unsubscribe <string>(TutorialMessages.TUTORIAL_STEP, OnNextStep);
public override void OnEnter() { PartyModel model = AmbitionApp.GetModel <PartyModel>(); AmbitionApp.GetModel <IncidentModel>().Schedule(model.Party?.ExitIncident); }
// Use this for initialization void Start() { _model = AmbitionApp.GetModel <InventoryModel>(); myText = GetComponent <Text>(); }
public void Execute() { CommodityVO penalty = new CommodityVO(CommodityType.Credibility, AmbitionApp.Game.ExhaustionPenalty); AmbitionApp.SendMessage(penalty); }
void OnDestroy() { _button.onClick.RemoveListener(OnClick); AmbitionApp.Unsubscribe <RoomVO>(MapMessage.GO_TO_ROOM, HandleCurrentRoom); }
private void Awake() { AmbitionApp.Subscribe <string>(TutorialMessages.TUTORIAL_STEP, HandleStep); }
private void OnEnable() { HandleRoom(AmbitionApp.GetModel <MapModel>().Room); }
private void OnDestroy() { AmbitionApp.Unsubscribe <string>(TutorialMessages.TUTORIAL_STEP, HandleStep); }
public void Execute(ItemVO item) { AmbitionApp.Inventory.Inventory.Remove(item); AmbitionApp.SendMessage(InventoryMessages.ITEM_DELETED, item); AmbitionApp.Inventory.Broadcast(); }
public void Accept() { AmbitionApp.SendMessage(PartyMessages.ACCEPT_INVITATION, _rendezvous); SetText(RSVP.Accepted, _rendezvous.IsCaller); }
private void HandleFadeOutComplete() { AmbitionApp.Unsubscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete); AmbitionApp.SendMessage <string>(GameMessages.LOAD_SCENE, _sceneID); AmbitionApp.SendMessage(GameMessages.FADE_IN); }
public void Decline() { AmbitionApp.SendMessage(PartyMessages.DECLINE_INVITATION, _rendezvous); SetText(RSVP.Declined, _rendezvous.IsCaller); }
public bool CheckRequirements(CommodityVO[] requirments) { GameModel model = AmbitionApp.GetModel <GameModel>(); foreach (CommodityVO req in requirments) { switch (req.Type) { case CommodityType.Item: InventoryModel inventory = AmbitionApp.GetModel <InventoryModel>(); ItemVO item = inventory.Inventory.Find(i => i.Name == req.ID); if (item == null || item.Quantity < req.Value) { return(false); } break; case CommodityType.Livre: if (model.Livre < req.Value) { return(false); } break; case CommodityType.Location: ParisModel paris = AmbitionApp.GetModel <ParisModel>(); if (!paris.Locations.Contains(req.ID)) { return(false); } break; case CommodityType.Reputation: FactionModel factions = AmbitionApp.GetModel <FactionModel>(); return((req.ID != null && factions.Factions.ContainsKey(req.ID)) ? factions[req.ID].Reputation >= req.Value : model.Reputation >= req.Value); case CommodityType.Servant: ServantModel servants = AmbitionApp.GetModel <ServantModel>(); if (!servants.Servants.ContainsKey(req.ID)) { return(false); } break; case CommodityType.Date: CalendarModel calendar = AmbitionApp.GetModel <CalendarModel>(); if (calendar.Today.Ticks < req.Value) { return(false); } break; case CommodityType.Mark: MapModel map = AmbitionApp.GetModel <MapModel>(); return(Array.Exists(map.Map.Rooms, r => r.HostHere && r.Cleared)); } } return(true); }
private void Awake() { AmbitionApp.Subscribe <RendezVO>(PartyMessages.DECLINE_INVITATION, OnDecline); }
public override void OnClose() { AmbitionApp.SendMessage <string>(GameMessages.DIALOG_CLOSED, ID); }
private void OnDestroy() { AmbitionApp.Unsubscribe <RendezVO>(PartyMessages.DECLINE_INVITATION, OnDecline); }
public void Dispose() { AmbitionApp.Unsubscribe <string>(GameMessages.DIALOG_CLOSED, HandleDialog); }
protected void OnClick() { AmbitionApp.SendMessage(MapMessage.GO_TO_ROOM, _room); }
void Awake() { _meter = GetComponent <Slider>(); AmbitionApp.Subscribe <OutfitVO>(HandleOutfit); }
private void OnDisable() { AmbitionApp.Unsubscribe <CharacterVO>(PartyMessages.GUEST_SELECTED, HandleSelect); AmbitionApp.Unsubscribe <RemarkVO>(HandleRemark); }