Ejemplo n.º 1
0
            public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
            {
                InteractionInstance na = new AskToBehaveEx();

                na.Init(ref parameters);
                return(na);
            }
Ejemplo n.º 2
0
        public override bool Run()
        {
            try
            {
                if (AskToBehaveEx.SatisfiesLikingGate(Actor, Target))
                {
                    VisitSituation situation = Target.GetSituationOfType <VisitSituation>();
                    if (situation != null)
                    {
                        VisitSituation.TimeForGuestToLeave child = situation.Child as VisitSituation.TimeForGuestToLeave;
                        if (child != null)
                        {
                            situation.SetState(new VisitSituation.Socializing(situation));
                        }
                    }

                    return(true);
                }
                else
                {
                    return(base.Run());
                }
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }
Ejemplo n.º 3
0
 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance na = new AskToBehaveEx();
     na.Init(ref parameters);
     return na;
 }