Ejemplo n.º 1
0
        public override void OnOpen(DateTime date)
        {
            CharacterModel     model = AmbitionApp.GetModel <CharacterModel>();
            GameObject         obj;
            RendezvousListItem item = ListItem;

            AmbitionApp.GetModel <CharacterModel>().CreateRendezvous = null;

            _rendez = new RendezVO()
            {
                Created  = AmbitionApp.Calendar.Day,
                RSVP     = RSVP.New,
                Day      = date.Subtract(AmbitionApp.Calendar.StartDate).Days,
                IsCaller = true
            };

            foreach (CharacterVO character in model.Characters.Values)
            {
                if (character.IsDateable && !character.IsRendezvousScheduled)
                {
                    if (item == null)
                    {
                        obj  = Instantiate(ListItem.gameObject, ListItem.transform.parent);
                        item = obj.GetComponent <RendezvousListItem>();
                    }
                    item?.SetCharacter(character, LiaisonConfig.GetSprite(character.Faction.ToString()));
                    item = null;
                }
            }
        }
Ejemplo n.º 2
0
 public void OnSelectLiaison(RendezvousListItem listItem)
 {
     _rendez.ID = listItem?.Character?.ID;
     ConfirmButton.interactable = !string.IsNullOrEmpty(_rendez.Character);
 }