Beispiel #1
0
        // for moving in game
        public void MoveTo(Square location)
        {
            if(this.location != null) this.location.SetOccupant(null);
            this.location = location;
            location.SetOccupant(this);

            animation.Position = location.Position();
        }
Beispiel #2
0
 // for setting initial position
 public void SetLocation(Square location)
 {
     if(this.location != null) this.location.SetOccupant(null);
     this.location = location;
     location.SetOccupant(this);
 }