Exemplo n.º 1
0
        public override bool Run() // Run
        {
            NiecHelperSituation situationOfType = Target.GetSituationOfType <NiecHelperSituation>();

            if (situationOfType != null)
            {
                situationOfType.Exit();
            }
            if (AnimationUtil.StopAllAnimation(Actor))
            {
                StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
                return(false);
            }
            else
            {
                StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive));
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool Run() // Run
        {
            try
            {
                NiecHelperSituation situationOfType = Target.GetSituationOfType <NiecHelperSituation>();
                if (situationOfType != null)
                {
                    situationOfType.Exit();
                    Target.Autonomy.SituationComponent.RemoveRole(situationOfType);

                    foreach (var item in Situation.sAllSituations)
                    {
                        if (item == situationOfType)
                        {
                            Situation.sAllSituations.Remove(situationOfType);
                        }
                    }
                }
                if (AnimationUtil.StopAllAnimation(Actor))
                {
                    Actor.SetObjectToReset();
                    StyledNotification.Show(new StyledNotification.Format("Check Ok", StyledNotification.NotificationStyle.kGameMessagePositive));
                    return(false);
                }
                else
                {
                    StyledNotification.Show(new StyledNotification.Format("Check Failed", StyledNotification.NotificationStyle.kGameMessagePositive));
                }
            }
            catch (ResetException)
            {
                throw;
            }
            catch
            { }

            return(true);
        }