使用環境AIR SDK15.0
在正式輸出的時候 我通常會增加inline的設定
來增加程式執行的效能.
但發現經常會有一些地方會有奇怪的效果
public override function stage():Stage{
return xxx;
}
public final get addedToStage():Boolean{
return super.stage != null;
}
當在如上的例子中使用super就會有這個問題.
必須要將其中的final 拿掉不然會有非預期的輸出結果.
因為在ASC2.0中如果getter 或setter 中使用final會等同有加 [inline]的效果.
參考資料
Introducing ASC 2.0
Inline(內聯函數)在AS3中的使用
ActionScript Compiler 2.0 Backward Compatibility
訂閱:
張貼留言 (Atom)
[Unity] Odin Inspector DateTime 時間屬性繪製
Odin Inspector 是一個有名的Unity Inspector Plugin,但沒有為 DateTime 建立可編輯的可視化介面,這邊簡單提供一個可用的方法 。 Odin Inspector 版本 : 3.3.1.14
-
IP Messenger 4.99r3 繁體中文版 介紹:方便區網內傳輸的小工具,又名飛鴿傳書。 支援文字、圖片、檔案、資料夾點對點傳輸。
-
使用環境 : Visual Studio Community 2019 錯誤訊息 : 錯誤 NETSDK1004 找不到資產檔案 '...\obj\project.assets.json'。請執行 NuGet 套件還原,以產生此檔案。
-
Cocos Creator 編譯Android APK失敗的可能原因 Execution failed for task Cocos Creator 版本: 2.3.1 NDK版本:r21 Android SDK:29 編譯方式: default 問題: Windows...
沒有留言:
張貼留言