Trashed GameService, use the new manager caller.

(This was changed in Java a few weeks back.)


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@80 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-09-27 23:57:48 +00:00
parent 33031417aa
commit 7fd42fc729
4 changed files with 1 additions and 112 deletions
@@ -232,7 +232,7 @@ public /*abstract*/ class GameController extends PlaceController
protected function playerReady () :void protected function playerReady () :void
{ {
log.info("Reporting ready " + _gobj.which() + "."); log.info("Reporting ready " + _gobj.which() + ".");
_gobj.gameService.playerReady(_ctx.getClient()); _gobj.manager.invoke("playerReady");
} }
/** /**
@@ -1,39 +0,0 @@
//
// $Id: GameService.java 3600 2005-06-15 23:46:31Z ray $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
// http://www.threerings.net/code/narya/
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game.client {
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
/**
* Provides services used by game clients to request that actions be taken
* by the game manager.
*/
public interface GameService extends InvocationService
{
/**
* Lets the game manager know that the calling player is in the game
* room and ready to play.
*/
function playerReady (client :Client) :void;
}
}
@@ -1,49 +0,0 @@
//
// $Id: GameMarshaller.java 4145 2006-05-24 01:24:24Z ray $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved
// http://www.threerings.net/code/narya/
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game.data {
import com.threerings.parlor.game.client.GameService;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent;
/**
* Provides the implementation of the {@link GameService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
* to the requesting client.
*/
public class GameMarshaller extends InvocationMarshaller
implements GameService
{
/** The method id used to dispatch {@link #playerReady} requests. */
public static const PLAYER_READY :int = 1;
// documentation inherited from interface
public function playerReady (arg1 :Client) :void
{
sendRequest(arg1, PLAYER_READY, [ ]);
}
}
}
@@ -46,9 +46,6 @@ import com.threerings.crowd.data.PlaceObject;
public class GameObject extends PlaceObject public class GameObject extends PlaceObject
{ {
// AUTO-GENERATED: FIELDS START // AUTO-GENERATED: FIELDS START
/** The field name of the <code>gameService</code> field. */
public static const GAME_SERVICE :String = "gameService";
/** The field name of the <code>state</code> field. */ /** The field name of the <code>state</code> field. */
public static const STATE :String = "state"; public static const STATE :String = "state";
@@ -92,9 +89,6 @@ public class GameObject extends PlaceObject
* game prematurely. */ * game prematurely. */
public static const PLAYER_LEFT_GAME :int = 1; public static const PLAYER_LEFT_GAME :int = 1;
/** Provides general game invocation services. */
public var gameService :GameMarshaller;
/** The game state, one of {@link #PRE_GAME}, {@link #IN_PLAY}, /** The game state, one of {@link #PRE_GAME}, {@link #IN_PLAY},
* {@link #GAME_OVER}, or {@link #CANCELLED}. */ * {@link #GAME_OVER}, or {@link #CANCELLED}. */
public var state :int = PRE_GAME; public var state :int = PRE_GAME;
@@ -260,22 +254,6 @@ public class GameObject extends PlaceObject
// // AUTO-GENERATED: METHODS START // // AUTO-GENERATED: METHODS START
// /** // /**
// * Requests that the <code>gameService</code> field be set to the
// * specified value. The local value will be updated immediately and an
// * event will be propagated through the system to notify all listeners
// * that the attribute did change. Proxied copies of this object (on
// * clients) will apply the value change when they received the
// * attribute changed notification.
// */
// public function setGameService (value :GameMarshaller) :void
// {
// var ovalue :GameMarshaller = this.gameService;
// requestAttributeChange(
// GAME_SERVICE, value, ovalue);
// this.gameService = value;
// }
//
// /**
// * Requests that the <code>state</code> field be set to the // * Requests that the <code>state</code> field be set to the
// * specified value. The local value will be updated immediately and an // * specified value. The local value will be updated immediately and an
// * event will be propagated through the system to notify all listeners // * event will be propagated through the system to notify all listeners
@@ -461,7 +439,6 @@ public class GameObject extends PlaceObject
{ {
super.readObject(ins); super.readObject(ins);
gameService = (ins.readObject() as GameMarshaller);
state = ins.readInt(); state = ins.readInt();
isRated = ins.readBoolean(); isRated = ins.readBoolean();
isPrivate = ins.readBoolean(); isPrivate = ins.readBoolean();