Example #1
0
 public void InteractWith(Actor other_actor)
 {
     if (Interactors.Contains(other_actor))
     {
         return;          // this should prevent infinite recursion
     }
     Interactors.Clear(); // in future, interact with player first, then an npc
     Interactors.Add(other_actor);
     other_actor.Interactions.InteractWith(Actor);
 }
        public void Copy(InteractionObject _object)
        {
            if (_object == null)
            {
                return;
            }

            base.Copy(_object);

            Interactors.Clear();
            foreach (InteractorObject _interactor in _object.Interactors)
            {
                Interactors.Add(new InteractorObject(_interactor));
            }
        }