예제 #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);
 }
    private void Start()
    {
        //this.trajectory = new FollowTrajectory(new LinearTrajectory(), this.gameObject, Target);
        // this.trajectory = TrajectoryManager.Instance.Create("FollowTrajectory.LinearTrajectory", this.gameObject, this.gameObject.transform.position, this.Target.transform.position, this.Target);
        //this.trajectory = new FollowTrajectory(new LinearTrajectory(), this.gameObject, this.Target);
        this.trajectory = new LookAtTrajectory(new FollowTrajectory(new LinearTrajectory(), this.gameObject, this.Target), this.gameObject, this.LookAtTarget);
        this.trajectory.CallbackWhenCompleted = () => Debug.LogError("JASKDJAKSLDJKLSAD");

        list          = new ReactionList <GameObject>();
        list.changed += () => Debug.LogError("ASDJKSADKLSA");

        list.Add(this.gameObject);
    }