Files
narya/src/as/com/threerings/crowd/client/LocationAdapter.as
T
Ray Greenwell c143e93554 Spot stuff in AbjectScript.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4144 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-24 00:20:00 +00:00

44 lines
1.2 KiB
ActionScript

package com.threerings.crowd.client {
import com.threerings.crowd.data.PlaceObject;
public class LocationAdapter
implements LocationObserver
{
public function LocationAdapter (
mayChange :Function = null, didChange :Function = null,
changeFailed :Function = null)
{
_mayChange = mayChange;
_didChange = didChange;
_changeFailed = changeFailed;
}
// documentation inherited from interface LocationObserver
public function locationMayChange (placeId :int) :Boolean
{
return (_mayChange == null) || _mayChange(placeId);
}
// documentation inherited from interface LocationObserver
public function locationDidChange (place :PlaceObject) :void
{
if (_didChange != null) {
_didChange(place);
}
}
// documentation inherited from interface LocationObserver
public function locationChangeFailed (placeId :int, reason :String) :void
{
if (_changeFailed != null) {
_changeFailed(placeId, reason);
}
}
protected var _mayChange :Function;
protected var _didChange :Function;
protected var _changeFailed :Function;
}
}