Esempio n. 1
0
 //
 private void check_and_load(string name)
 {
     _lwfObject.lwfName = name;
     _fileSelectIndex   = _fileList.Find(name);
     if (exist_resource(name))
     {
         Debug.Log(name);
         _lwfObject.CreatePlayer();
         Debug.Log(name);
     }
 }
Esempio n. 2
0
    static SpriteObject load_lwf(GameObject obj, string path)
    {
        SpriteObject sobj = obj.AddComponent <SpriteObject>();

        sobj.lwfName = path;
        sobj.CreatePlayer();
        sobj.player.AddEventHandler("finish", (movie, button) => { Debug.Log("FINISH"); });
        //sobj.player.rootMovie.SetEventHandler("finish", (movie, button) => { Debug.Log("FINISH"); });


        return(sobj);
    }
Esempio n. 3
0
            // @class SpriteObject
            // @desc GameObjectにSpriteObjectを貼り付けて読み込む
            // @decl load(gameobject, path, is_ui)
            // @param gameobject 対象となるGameObject
            // @param path LWFのファイルパス
            // @param is_ui レンダラがUI対応版かどうか
            private static int L_load(ILuaState lua)
            {
                GameObject obj   = get_internal <GameObject>(lua, 1);
                string     path  = lua.ToString(2);
                bool       is_ui = lua.ToBoolean(3);

                SpriteObject sobj = obj.AddComponent <SpriteObject>();

                sobj.lwfName = path;
                if (is_ui)
                {
                    sobj.renderType = SpriteObject.RenderType.UI;
                }

                push_new <SpriteObject>(lua, klassName, sobj, obj);
                lua.SetField(1, "sprite_object");

                sobj.CreatePlayer();

                return(0);
            }