Last active
December 15, 2015 09:59
-
-
Save gamebuilderstudio/5241976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gbs.plugins.descriptor | |
{ | |
import com.gbs.gameeditor.descriptors.ObjectDescriptor; | |
import com.gbs.plugins.CustomComponentClassList; | |
import com.gbs.plugins.DescriptorVO; | |
import com.gbs.plugins.PluginDescriptor; | |
import com.gbs.plugins.components.CustomGameEngineComponent; | |
import com.gbs.plugins.views.panels.CustomComponentPropertiesUI; | |
public final class CustomPluginDescriptor extends PluginDescriptor | |
{ | |
public function CustomPluginDescriptor() | |
{ | |
super(); | |
//Random UID | |
this._uid = 'plugin::998HDKLSD-DHKJUS34-35SDFD'; | |
this.classList = CustomComponentClassList; | |
//There will be multiple game types in GBS define which one your plugin supports (i.e. Basic2D or Isometric) | |
this.gameTypeId = PluginDescriptor.GAME_TYPE_ID_BASIC2D; | |
var customCompatibleGameTypeIds : Vector.<String> = new <String>[PluginDescriptor.GAME_TYPE_ID_ALL]; | |
//This is where you define property panels for different components in your plugin | |
this.objectDescriptors = new Vector.<DescriptorVO>(); | |
this.objectDescriptors.push( new DescriptorVO( CustomComp, customCompatibleGameTypeIds) ); | |
//This is where you define property panels for different actions in your plugin | |
this.classDescriptors = new Vector.<ClassDescriptor>(); | |
//this.classDescriptors.push( CustomPluginDescriptor.customActionUI ); | |
} | |
public static const CustomComp : ObjectDescriptor = new ObjectDescriptor(CustomGameEngineComponent, "My Custom Component", | |
ObjectDescriptor.COMPONENT, new <Class>[ CustomComponentPropertiesUI ]); | |
//public static const customActionUI : ClassDescriptor = new ClassDescriptor(CustomAction, CustomActionPropertiesUI, ClassDescriptor.ACTION); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment