コード例 #1
0
 public Npc(string name, Location location) : base(name, location)
 {
     _greeting = " ... ";
     location.NpcList.Add(this);
     ReactionList.Clear();
     ReactionList.Add("Argh!");
 }
コード例 #2
0
        private async void GetReactionsCommand()
        {
            ReactionList.Clear();
            List <ReactionInfo> tmp = new List <ReactionInfo>();

            if (Mode == "my")
            {
                OutputMessages.Add(new OutputMessage {
                    Message = "Loading " + CurrentUser + "'s reaction(s)...", Level = ""
                });
                _logService.Write(this, "Loading " + CurrentUser + "'s reaction(s)...", "debug");
                tmp = await _dbService.GetReactions(Person);
            }
            else
            {
                OutputMessages.Add(new OutputMessage {
                    Message = "Loading all reaction(s)...", Level = ""
                });
                _logService.Write(this, "Loading all reaction(s)...", "debug");
                tmp = await _dbService.GetReactions();
            }
            OutputMessages.Add(new OutputMessage {
                Message = tmp.Count + " reaction(s) loaded!", Level = ""
            });
            _logService.Write(this, tmp.Count + " reaction(s) loaded", "debug");
            foreach (var item in tmp)
            {
                ReactionList.Add(item);
            }
        }
コード例 #3
0
 public Npc(string name, string greeting, Location location) : base(name, location)
 {
     _greeting = greeting;
     ReactionList.Clear();
     ReactionList.Add("Argh!");
     MoveTo(location);
 }