private void OnActorLocationChanged(object sender, LocationChangedEventArgs args) { Actor actor = (Actor) sender; Location new_loc = args.NewLocation; Location old_loc = args.OldLocation; this[old_loc.Position].Actor = null; RaiseGridChanged (old_loc.Position); if (new_loc != null) { this[new_loc.Position].Actor = actor; RaiseGridChanged (new_loc.Position); } }
private void OnItemLocationChanged(object sender, LocationChangedEventArgs args) { Item item = (Item) sender; Location new_loc = args.NewLocation; Location old_loc = args.OldLocation; if (old_loc != null) { this[old_loc.Position].Item = null; RaiseGridChanged (old_loc.Position); } if (new_loc != null) { this[new_loc.Position].Item = item; RaiseGridChanged (new_loc.Position); } }
private void CenterLocationChangedHandler(object sender, LocationChangedEventArgs args) { map = args.NewLocation.Map; recenter = true; }