Thing is the parent of just about everything. Mobs, Players, Rooms - they're all Things!
Beispiel #1
0
        public bool Move(Thing targetThing)
        {
            var currentLocation = Location;

            if (!CanMove(targetThing))
            {
                return false;
            }

            if (Location != null)
            {
                Location.Contents.Remove(this);
                Location = null;
            }

            targetThing.Contents.Add(this);
            Location = targetThing;

            return true;
        }
Beispiel #2
0
 public bool Move(Thing targetThing, string message)
 {
     var ret = Move(targetThing);
     return ret;
 }
Beispiel #3
0
 /*public delegate void PreMove(Thing targetLocation);
 public event PreMove PreMove;
 public delegate void OnMove(Thing targetLocation);
 public event OnMove OnMove;*/
 public bool CanMove(Thing targetThing)
 {
     return true;
 }