Files
vilya/src/as/com/threerings/ezgame/client/EZGameService.as
T
Ray Greenwell 70b0d759c0 Moved the serverless game stuff out of msoy and back into the vilya library.
We'll be using this in game gardens, at least.
Note that the actionscript side currently doesn't compile because of
limitations in building a .swc file, but that'll be fixed soon.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@47 c613c5cb-e716-0410-b11b-feb51c14d237
2006-08-23 02:28:36 +00:00

79 lines
2.4 KiB
ActionScript

//
// $Id$
package com.threerings.ezgame.client {
import flash.utils.ByteArray;
import com.threerings.io.TypedArray;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.client.InvocationService_ConfirmListener;
import com.threerings.presents.client.InvocationService_InvocationListener;
/**
* Provides services for ez games.
*/
public interface EZGameService extends InvocationService
{
/**
* Request to set the specified property.
*/
function setProperty (
client :Client, propName :String, value :Object, index :int,
listener :InvocationService_InvocationListener) :void;
/**
* Request to end the turn, possibly futzing the next turn holder unless
* -1 is specified for the nextPlayerIndex.
*/
function endTurn (
client :Client, nextPlayerIndex :int,
listener :InvocationService_InvocationListener) :void;
/**
* Request to end the game, with the specified player indices assigned
* as winners.
*/
function endGame (
client :Client, winners :TypedArray /* of int */,
listener :InvocationService_InvocationListener) :void;
/**
* Request to send a private message to one other player in
* the game.
*/
function sendMessage (
client :Client, msgName :String, value :Object, playerIdx :int,
listener :InvocationService_InvocationListener) :void;
/**
* Add to the specified named collection.
*
* @param clearExisting if true, wipe the old contents.
*/
function addToCollection (
client :Client, collName :String, data :TypedArray /* of ByteArray */,
clearExisting :Boolean, listener :InvocationService_InvocationListener)
:void;
/**
* Merge the specified collection into the other.
*/
function mergeCollection (
client :Client, srcColl :String, intoColl :String,
listener :InvocationService_InvocationListener) :void;
/**
* Pick or deal some number of elements from the specified collection,
* and either set a property in the flash object, or delivery the
* picks to the specified player index via a game message.
*/
function getFromCollection (
client :Client, collName :String, consume :Boolean, count :int,
msgOrPropName :String, playerIndex :int,
listener :InvocationService_ConfirmListener) :void;
}
}