?? gamepack.as
字號:
?[IconFile("GamePack.png")]
import com.gamepackage.audio.*;
import com.gamepackage.comp.*;
import com.gamepackage.events.*;
import com.gamepackage.util.*;
dynamic class com.gamepackage.comp.GamePack extends MovieClip
{
/* STATIC PROPERTIES
* *
*/
static private var instance: MovieClip;
static private var depth: Number = 1;
/* STATIC METHODS
* *
*/
static function createGPackage( name: String ): Void
{
GamePack[ name ] = new GPackage( instance.createNewClip() );
}
/* INSTANCE
* * */
[Inspectable(defaultValue=true,false)]
private var showFPS: Boolean;
private var fps: TextField;
private function GamePack()
{
if ( instance ) return;
Impuls.initialize( instance = this );
if ( showFPS ) displayFPS();
}
private function onLoad(): Void
{
this._parent.main();
}
function createNewClip( Void ): MovieClip
{
return createEmptyMovieClip( "__gp_clip__" + depth , depth++ );
}
private function displayFPS( Void ): Void
{
createTextField( "fps" , 0 , 0 , 0 , 0 , 0 );
fps.autoSize = true;
fps.background = true;
fps.backgroundColor = 0x000000;
fps.border = true;
fps.borderColor = 0xffff00;
var tf: TextFormat = new TextFormat();
tf.size = 10;
tf.font = "Courier";
tf.color = 0xffff00;
fps.setNewTextFormat( tf );
FPS.toTextField( fps );
}
static function get $version():String
{
return "0.01"
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -