70b0d759c0
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
51 lines
1.1 KiB
Java
51 lines
1.1 KiB
Java
//
|
|
// $Id$
|
|
|
|
package com.threerings.ezgame.data;
|
|
|
|
import java.io.IOException;
|
|
|
|
import com.threerings.io.ObjectInputStream;
|
|
import com.threerings.io.ObjectOutputStream;
|
|
import com.threerings.io.Streamable;
|
|
import com.threerings.io.Streamer;
|
|
|
|
import com.threerings.presents.dobj.DObject;
|
|
import com.threerings.presents.dobj.NamedEvent;
|
|
|
|
/**
|
|
* Represents a property change on the actionscript object we
|
|
* use in EZGameObject.
|
|
*/
|
|
public class PropertySetEvent extends NamedEvent
|
|
{
|
|
/** Suitable for unserialization. */
|
|
public PropertySetEvent ()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Create a PropertySetEvent.
|
|
*/
|
|
public PropertySetEvent (
|
|
int targetOid, String propName, Object value, int index)
|
|
{
|
|
super(targetOid, propName);
|
|
_data = value;
|
|
_index = index;
|
|
}
|
|
|
|
// from abstract DEvent
|
|
public boolean applyToObject (DObject target)
|
|
{
|
|
((EZGameObject) target).applyPropertySet(_name, _data, _index);
|
|
return true;
|
|
}
|
|
|
|
/** The index. */
|
|
protected int _index;
|
|
|
|
/** The client-side data that is assigned to this property. */
|
|
protected Object _data;
|
|
}
|