Beispiel #1
0
    IEnumerator LoadAssetAsync()
    {
        //加载AssetBundle
        WWW www = new WWW("file://" + Application.dataPath + "/AssetBundles/" + assetBundleName.text);

        yield return(www);

        NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>(assetName.text);

        UIModelMgr.Instance.GetModel <UIAnimMadeModel>().SetAnimList(JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo()));
        www.Dispose();
        CreateAnimGameObject();
        UIModelMgr.Instance.GetModel <UIAnimMadeModel>().InitAnimInfo();
        UIWindowMgr.Instance.PopPanel();
        UIWindowMgr.Instance.PushPanel <UIAnimCommission>();
    }
Beispiel #2
0
    IEnumerator LoadAssetSync()
    {
        //加载AssetBundle
        WWW www = new WWW("file://" + Application.dataPath + "/AssetBundles/" + "anim");

        yield return(www);

        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("forward_stand_shoot");
            forward_stand_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("back_stand_shoot");
            back_stand_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("left_stand_shoot");
            left_stand_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("right_stand_shoot");
            right_stand_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("forward_stand");
            forward_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("back_stand");
            back_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("left_stand");
            left_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("right_stand");
            right_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("forward_squat_shoot");
            forward_squat_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("back_squat_shoot");
            back_squat_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("left_squat_shoot");
            left_squat_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("right_squat_shoot");
            right_squat_shoot = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("shoot_stand_squat");
            shoot_stand_squat = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("shoot_squat_stand");
            shoot_squat_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("idle_stand_0");
            idle_stand_0 = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("fire_stand_0");
            fire_stand_0 = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("fire_squat_0");
            fire_squat_0 = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("reload_stand");
            reload_stand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("reload_squat");
            reload_squat = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("dead_stand_hou");
            dead_stand_hou = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("dead_stand_qian");
            dead_stand_qian = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("dead_squat");
            dead_squat = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("idle_shootStand");
            idle_shootStand = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("shootStand_idle");
            shootStand_idle = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
        {
            //加载对应动作的.asset文件
            NodesSaveInfoStruct ns = www.assetBundle.LoadAsset <NodesSaveInfoStruct>("run");
            run = JsonMapper.ToObject <List <Nodes[]> >(ns.GetNodesInfo());
        }
    }