Пример #1
0
 public void Execute(CommodityVO reward)
 {
     AmbitionApp.GetModel <GameModel>().Livre += reward.Value;
 }
Пример #2
0
 public void Execute(string location)
 {
     AmbitionApp.GetModel <ParisModel>().Locations.Remove(location);
 }
Пример #3
0
 public void Initialize(string dialogID)
 {
     _dialogID = dialogID;
     AmbitionApp.Subscribe <string>(GameMessages.DIALOG_CLOSED, HandleDialog);
 }
Пример #4
0
 public void Submit()
 {
     AmbitionApp.GetModel <CharacterModel>().CreateRendezvous = _rendez;
     AmbitionApp.SendMessage(RendezvousMessages.CHOOSE_RENDEZVOUS);
     Close();
 }
Пример #5
0
        public override void OnEnterState()
        {
            ParisModel paris = AmbitionApp.GetModel <ParisModel>();

            AmbitionApp.SendMessage(GameMessages.LOAD_SCENE, paris.Location.Scene);
        }
Пример #6
0
 public override void OnEnterState()
 {
     AmbitionApp.SendMessage(_messageID);
 }
Пример #7
0
 override public void OnEnterState()
 {
     AmbitionApp.Subscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete);
     AmbitionApp.SendMessage(GameMessages.FADE_OUT);
 }
Пример #8
0
 public IncidentTutorialOptionsInput()
 {
     AmbitionApp.Subscribe <TransitionVO[]>(CheckMomentDecision);
 }
Пример #9
0
 public void Dispose()
 {
     AmbitionApp.Unsubscribe <TransitionVO[]>(CheckMomentDecision);
 }
Пример #10
0
 public void Execute(CommodityVO reward)
 {
     AmbitionApp.SendMessage(ParisMessages.ADD_LOCATION, reward.ID);
 }
Пример #11
0
 private void OnDisable() => AmbitionApp.Unsubscribe <string>(TutorialMessages.TUTORIAL_STEP, OnNextStep);
Пример #12
0
        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>();
 }
Пример #14
0
        public void Execute()
        {
            CommodityVO penalty = new CommodityVO(CommodityType.Credibility, AmbitionApp.Game.ExhaustionPenalty);

            AmbitionApp.SendMessage(penalty);
        }
Пример #15
0
 void OnDestroy()
 {
     _button.onClick.RemoveListener(OnClick);
     AmbitionApp.Unsubscribe <RoomVO>(MapMessage.GO_TO_ROOM, HandleCurrentRoom);
 }
Пример #16
0
 private void Awake()
 {
     AmbitionApp.Subscribe <string>(TutorialMessages.TUTORIAL_STEP, HandleStep);
 }
Пример #17
0
 private void OnEnable()
 {
     HandleRoom(AmbitionApp.GetModel <MapModel>().Room);
 }
Пример #18
0
 private void OnDestroy()
 {
     AmbitionApp.Unsubscribe <string>(TutorialMessages.TUTORIAL_STEP, HandleStep);
 }
Пример #19
0
 public void Execute(ItemVO item)
 {
     AmbitionApp.Inventory.Inventory.Remove(item);
     AmbitionApp.SendMessage(InventoryMessages.ITEM_DELETED, item);
     AmbitionApp.Inventory.Broadcast();
 }
Пример #20
0
 public void Accept()
 {
     AmbitionApp.SendMessage(PartyMessages.ACCEPT_INVITATION, _rendezvous);
     SetText(RSVP.Accepted, _rendezvous.IsCaller);
 }
Пример #21
0
 private void HandleFadeOutComplete()
 {
     AmbitionApp.Unsubscribe(GameMessages.FADE_OUT_COMPLETE, HandleFadeOutComplete);
     AmbitionApp.SendMessage <string>(GameMessages.LOAD_SCENE, _sceneID);
     AmbitionApp.SendMessage(GameMessages.FADE_IN);
 }
Пример #22
0
 public void Decline()
 {
     AmbitionApp.SendMessage(PartyMessages.DECLINE_INVITATION, _rendezvous);
     SetText(RSVP.Declined, _rendezvous.IsCaller);
 }
Пример #23
0
        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);
        }
Пример #24
0
 private void Awake()
 {
     AmbitionApp.Subscribe <RendezVO>(PartyMessages.DECLINE_INVITATION, OnDecline);
 }
Пример #25
0
 public override void OnClose()
 {
     AmbitionApp.SendMessage <string>(GameMessages.DIALOG_CLOSED, ID);
 }
Пример #26
0
 private void OnDestroy()
 {
     AmbitionApp.Unsubscribe <RendezVO>(PartyMessages.DECLINE_INVITATION, OnDecline);
 }
Пример #27
0
 public void Dispose()
 {
     AmbitionApp.Unsubscribe <string>(GameMessages.DIALOG_CLOSED, HandleDialog);
 }
Пример #28
0
 protected void OnClick()
 {
     AmbitionApp.SendMessage(MapMessage.GO_TO_ROOM, _room);
 }
Пример #29
0
 void Awake()
 {
     _meter = GetComponent <Slider>();
     AmbitionApp.Subscribe <OutfitVO>(HandleOutfit);
 }
Пример #30
0
 private void OnDisable()
 {
     AmbitionApp.Unsubscribe <CharacterVO>(PartyMessages.GUEST_SELECTED, HandleSelect);
     AmbitionApp.Unsubscribe <RemarkVO>(HandleRemark);
 }