Last active
August 29, 2015 14:07
-
-
Save fum1h1ro/ceaadfb7bbea0e540a2e to your computer and use it in GitHub Desktop.
LWFの最もシンプルと思われるサンプルをBooで書くとこうなる……
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
import UnityEngine | |
class TestLWF (LWFObject): | |
def Start (): | |
set_loader() | |
Load( | |
'lwfdata/character', 'lwfdata/', '', 0.0f, 1.0f, 0, null as Camera, null as Camera, true, true, | |
null as System.Func[of LWF.Data, bool], | |
null as System.Action[of LWFObject], | |
null as System.Action[of LWFObject], | |
null as System.Func[of string, (byte)], | |
null as System.Func[of string, Texture2D], | |
null as System.Action[of Texture2D]) | |
def set_loader(): | |
lwflo = def(name): | |
asset = Resources.Load(name) as TextAsset | |
if asset == null: | |
return null | |
return asset.bytes | |
tex = def(name): | |
texture = Resources.Load(name) as Texture2D | |
if texture == null: | |
return null | |
return texture | |
LWFObject.SetLoader(lwflo as System.Func[of string, (byte)], tex as System.Func[of string, UnityEngine.Texture2D], null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update()が定義されていると、LWFObjectを阻害する