|
发表于 2010-5-5 19:28:11
|
显示全部楼层
其实有DataTable可以用的。
[codes=galaxy]
//--------------------------------------------------------------------------------------------------
// Data Table
// - Data tables provide named storage for any script type.
// Table access may be either global or thread-local.
//--------------------------------------------------------------------------------------------------
// Types
const int c_dataTypeUnknown = -1;
const int c_dataTypeAbilCmd = 0;
const int c_dataTypeActor = 1;
const int c_dataTypeActorScope = 2;
const int c_dataTypeAIFilter = 3;
const int c_dataTypeBank = 4;
const int c_dataTypeBool = 5;
const int c_dataTypeByte = 6;
const int c_dataTypeCameraInfo = 7;
const int c_dataTypeCinematic = 8;
const int c_dataTypeColor = 9;
const int c_dataTypeControl = 10;
const int c_dataTypeConversation = 11;
const int c_dataTypeDialog = 12;
const int c_dataTypeDoodad = 13;
const int c_dataTypeFixed = 14;
const int c_dataTypeInt = 15;
const int c_dataTypeMarker = 16;
const int c_dataTypeObjective = 17;
const int c_dataTypeOrder = 18;
const int c_dataTypePing = 19;
const int c_dataTypePlanet = 20;
const int c_dataTypePlayerGroup = 21;
const int c_dataTypePoint = 22;
const int c_dataTypePortrait = 23;
const int c_dataTypeRegion = 24;
const int c_dataTypeReply = 25;
const int c_dataTypeRevealer = 26;
const int c_dataTypeRoom = 27;
const int c_dataTypeSound = 28;
const int c_dataTypeSoundLink = 29;
const int c_dataTypeString = 30;
const int c_dataTypeText = 31;
const int c_dataTypeTimer = 32;
const int c_dataTypeTransmission = 33;
const int c_dataTypeTransmissionSource = 34;
const int c_dataTypeTrigger = 35;
const int c_dataTypeUnit = 36;
const int c_dataTypeUnitFilter = 37;
const int c_dataTypeUnitGroup = 38;
const int c_dataTypeUnitRef = 39;
const int c_dataTypeWave = 40;
const int c_dataTypeWaveInfo = 41;
const int c_dataTypeWaveTarget = 42;
// General functionality
native void DataTableClear (bool global);
native int DataTableValueCount (bool global);
native string DataTableValueName (bool global, int index);
native bool DataTableValueExists (bool global, string name);
native int DataTableValueType (bool global, string name);
native void DataTableValueRemove (bool global, string name);
// Type-specific value set/get
// - c_dataTypeAbilCmd
native void DataTableSetAbilCmd (bool global, string name, abilcmd val);
native abilcmd DataTableGetAbilCmd (bool global, string name);
// - c_dataTypeActor
native void DataTableSetActor (bool global, string name, actor val);
native actor DataTableGetActor (bool global, string name);
// - c_dataTypeActorScope
native void DataTableSetActorScope (bool global, string name, actorscope val);
native actorscope DataTableGetActorScope (bool global, string name);
// - c_dataTypeAIFilter
native void DataTableSetAIFilter (bool global, string name, aifilter val);
native aifilter DataTableGetAIFilter (bool global, string name);
// - c_dataTypeBank
native void DataTableSetBank (bool global, string name, bank val);
native bank DataTableGetBank (bool global, string name);
// - c_dataTypeBool
native void DataTableSetBool (bool global, string name, bool val);
native bool DataTableGetBool (bool global, string name);
// - c_dataTypeByte
native void DataTableSetByte (bool global, string name, byte val);
native byte DataTableGetByte (bool global, string name);
// - c_dataTypeCameraInfo
native void DataTableSetCameraInfo (bool global, string name, camerainfo val);
native camerainfo DataTableGetCameraInfo (bool global, string name);
// - c_dataTypeCinematic
native void DataTableSetCinematic (bool global, string name, int val);
native int DataTableGetCinematic (bool global, string name);
// - c_dataTypeColor
native void DataTableSetColor (bool global, string name, color val);
native color DataTableGetColor (bool global, string name);
// - c_dataTypeControl
native void DataTableSetControl (bool global, string name, int val);
native int DataTableGetControl (bool global, string name);
// - c_dataTypeConversation
native void DataTableSetConversation (bool global, string name, int val);
native int DataTableGetConversation (bool global, string name);
// - c_dataTypeDialog
native void DataTableSetDialog (bool global, string name, int val);
native int DataTableGetDialog (bool global, string name);
// - c_dataTypeDoodad
native void DataTableSetDoodad (bool global, string name, doodad val);
native doodad DataTableGetDoodad (bool global, string name);
// - c_dataTypeFixed
native void DataTableSetFixed (bool global, string name, fixed val);
native fixed DataTableGetFixed (bool global, string name);
// - c_dataTypeInt
native void DataTableSetInt (bool global, string name, int val);
native int DataTableGetInt (bool global, string name);
// - c_dataTypeMarker
native void DataTableSetMarker (bool global, string name, marker val);
native marker DataTableGetMarker (bool global, string name);
// - c_dataTypeObjective
native void DataTableSetObjective (bool global, string name, int val);
native int DataTableGetObjective (bool global, string name);
// - c_dataTypeOrder
native void DataTableSetOrder (bool global, string name, order val);
native order DataTableGetOrder (bool global, string name);
// - c_dataTypePing
native void DataTableSetPing (bool global, string name, int val);
native int DataTableGetPing (bool global, string name);
// - c_dataTypePlanet
native void DataTableSetPlanet (bool global, string name, int val);
native int DataTableGetPlanet (bool global, string name);
// - c_dataTypePlayerGroup
native void DataTableSetPlayerGroup (bool global, string name, playergroup val);
native playergroup DataTableGetPlayerGroup (bool global, string name);
// - c_dataTypePoint
native void DataTableSetPoint (bool global, string name, point val);
native point DataTableGetPoint (bool global, string name);
// - c_dataTypePortrait
native void DataTableSetPortrait (bool global, string name, int val);
native int DataTableGetPortrait (bool global, string name);
// - c_dataTypeRegion
native void DataTableSetRegion (bool global, string name, region val);
native region DataTableGetRegion (bool global, string name);
// - c_dataTypeReply
native void DataTableSetReply (bool global, string name, int val);
native int DataTableGetReply (bool global, string name);
// - c_dataTypeRevealer
native void DataTableSetRevealer (bool global, string name, revealer val);
native revealer DataTableGetRevealer (bool global, string name);
// - c_dataTypeRoom
native void DataTableSetRoom (bool global, string name, int val);
native int DataTableGetRoom (bool global, string name);
// - c_dataTypeSound
native void DataTableSetSound (bool global, string name, sound val);
native sound DataTableGetSound (bool global, string name);
// - c_dataTypeSoundLink
native void DataTableSetSoundLink (bool global, string name, soundlink val);
native soundlink DataTableGetSoundLink (bool global, string name);
// - c_dataTypeString
native void DataTableSetString (bool global, string name, string val);
native string DataTableGetString (bool global, string name);
// - c_dataTypeText
native void DataTableSetText (bool global, string name, text val);
native text DataTableGetText (bool global, string name);
// - c_dataTypeTimer
native void DataTableSetTimer (bool global, string name, timer val);
native timer DataTableGetTimer (bool global, string name);
// - c_dataTypeTransmission
native void DataTableSetTransmission (bool global, string name, int val);
native int DataTableGetTransmission (bool global, string name);
// - c_dataTypeTransmissionSource
native void DataTableSetTransmissionSource (bool global, string name, transmissionsource val);
native transmissionsource DataTableGetTransmissionSource (bool global, string name);
// - c_dataTypeTrigger
native void DataTableSetTrigger (bool global, string name, trigger val);
native trigger DataTableGetTrigger (bool global, string name);
// - c_dataTypeUnit
native void DataTableSetUnit (bool global, string name, unit val);
native unit DataTableGetUnit (bool global, string name);
// - c_dataTypeUnitFilter
native void DataTableSetUnitFilter (bool global, string name, unitfilter val);
native unitfilter DataTableGetUnitFilter (bool global, string name);
// - c_dataTypeUnitGroup
native void DataTableSetUnitGroup (bool global, string name, unitgroup val);
native unitgroup DataTableGetUnitGroup (bool global, string name);
// - c_dataTypeUnitRef
native void DataTableSetUnitRef (bool global, string name, unitref val);
native unitref DataTableGetUnitRef (bool global, string name);
// - c_dataTypeWave
native void DataTableSetWave (bool global, string name, wave val);
native wave DataTableGetWave (bool global, string name);
// - c_dataTypeWaveInfo
native void DataTableSetWaveInfo (bool global, string name, waveinfo val);
native waveinfo DataTableGetWaveInfo (bool global, string name);
// - c_dataTypeWaveTarget
native void DataTableSetWaveTarget (bool global, string name, wavetarget val);
native wavetarget DataTableGetWaveTarget (bool global, string name);
[/codes]
----------- 帖子于 19:28 更新 --------- 之前内容发布于 19:26 ------------
此外还可以使用Bank。
见链接http://bbs.islga.org/read-htm-tid-40410.html |
|