32. 安裝外掛程式 2/2
舊版外掛程式
Zip壓縮檔
安裝路徑
<install path>exportershtml5plugins for plugins
<install path>exportershtml5behaviors for behaviors
<install path>effects for effects
每個plugin及behavior要各別建立子目錄,將外掛程式解壓到子目錄下
Wu, ShyiShiou32
33. info.xml
<?xml version="1.0" encoding="UTF-8" ?>
<c2addon>
<!-- One of: plugin, behavior, effect -->
<type>behavior</type>
<name>My Super Behavior</name>
<version>1.0</version>
<author>Ashley Gullen</author>
<website>http://www.scirra.com</website>
<documentation>https://www.scirra.com/manual/1/construct-2</documentation>
<description>A short description of what this addon does.</description>
</c2addon>
Wu, ShyiShiou33
34. common.js
// Scripts in this file are included in both the IDE and runtime, so you only
// need to write scripts common to both once.
Wu, ShyiShiou34
35. function GetBehaviorSettings() {
return {
"name": "MyBehavior", // as appears in 'add behavior' dialog, can be changed as
long as "id" stays the same
"id": "MyBehavior", // this is used to identify this behavior and is saved to the
project; never change it
“version”: “1.0”, // Behavior版本 - C2據此顯示相容性警告
"description": "<appears at the bottom of the add behavior dialog>",
"author": "<your name/organisation>",
"help url": "<your website or a manual entry on Scirra.com>",
"category": "General", // Prefer to re-use existing
categories, but you can set anything here
"flags": 0 // uncomment lines to enable flags...
// | bf_onlyone // can only be added once
to an object, e.g. solid
};
};
//////////////////////////////////////// Wu, ShyiShiou35