Exemple #1
0
        private void HandleRound()
        {
            float t = _modelService.GetModel <PartyModel>().RoundTime;

            StopAllCoroutines();
            StartCoroutine(CountDown(t));
        }
Exemple #2
0
        public override void OnEnterState()
        {
            ConversationModel model = _models.GetModel <ConversationModel>();
            int numCharmed          = Array.FindAll(model.Guests, g => g.State == GuestState.Charmed).Length;

            model.Remark       = null;
            model.Room.Cleared = true;

            if (model.Room.Rewards != null && model.Room.Rewards.Length > 0)
            {
                model.Party.Rewards.AddRange(model.Room.Rewards);
                AmbitionApp.SendMessage(model.Room.Rewards);
            }
            else
            {
                model.Party.Rewards.Add(GenerateRandomReward(numCharmed, model.Party.Faction));
            }
            int numRemarks = (int)(model.MaxDeckSize * .1f);

            AmbitionApp.SendMessage(PartyMessages.RESHUFFLE_REMARKS, numRemarks);
            //AmbitionApp.OpenDialog("END_CONVERSATION", model.Room.Rewards);
            AmbitionApp.SendMessage(PartyMessages.END_CONVERSATION);
        }
        //This is not being handled via an Initialize function because this dialog needs to be brought up via the state machine, and there's currently no way to use 'Open Dialog' and set an array of commodities at the same time
        //While I could have made the state machine able to accept both a string and CommodityVO[] in the same state, I didn't feel comfortable making changes to something as critical as the state machine
        public void Awake()
        {
            ConversationModel conversationModel = _models.GetModel <ConversationModel>();

            Commodities.SetCommodities(conversationModel.Room.Rewards);
        }