Thing is the parent of just about everything. Mobs, Players, Rooms - they're all Things!
Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public bool Move(Thing targetThing, string message)
 {
     var ret = Move(targetThing);
     return ret;
 }
Exemplo n.º 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;
 }