コード例 #1
0
        private string getTargetString(AbstractEntity target)
        {
            AbstractFieldOfVision fieldOfVision = GameController.Instance.FieldOfVision;

            if (target != null && (fieldOfVision.IsInFieldOfVision(target.Position) || target.Person == Person.Second))
            {
                return(target.Accusativ);
            }
            else
            {
                return("coś");
            }
        }
コード例 #2
0
        public void ShowMessage(string key, AbstractEntity performer, AbstractEntity target, bool force)
        {
            AbstractFieldOfVision fieldOfVision = GameController.Instance.FieldOfVision;

            if (fieldOfVision.IsInFieldOfVision(performer.Position) || force || performer.Person == Person.Second)
            {
                string targetString = getTargetString(target);
                string message      = getMessage(performer.Person, key, performer.Identity,
                                                 target != null ? targetString : "");
                window.ShowMessage(message);
                logMessage(message);
            }
            if (!fieldOfVision.IsInFieldOfVision(performer.Position) &&
                performer.Person == Person.Third && target != null && target.Person == Person.Second)
            {
                string message = getMessage(performer.Person, key, "coś", target.Accusativ);
                window.ShowMessage(message);
                logMessage(message);
            }
        }
コード例 #3
0
 public void ShowMessage(string key, AbstractEntity performer)
 {
     ShowMessage(key, performer, null);
     GameController.Instance.Console.Refresh();
 }
コード例 #4
0
 public void ShowMessage(string key, AbstractEntity performer, bool force)
 {
     ShowMessage(key, performer, null, force);
 }
コード例 #5
0
 public void ShowMessage(string key, AbstractEntity performer, AbstractEntity target)
 {
     ShowMessage(key, performer, target, false);
 }