示例#1
0
    /**创建天使模型 */
    private FuBenCardCtrl createAngelModel(Transform parent, AngelSample angel)
    {
        //"angel/"+angel.modelID
        passObj angelObj = Create3Dobj("angel/" + angel.modelID);

        angelObj.obj.transform.parent        = parent;
        angelObj.obj.transform.localScale    = new Vector3(1, 1, 1);
        angelObj.obj.transform.localPosition = Vector3.zero;
        angelObj.obj.transform.localRotation = new Quaternion(0, 0, 0, 1);
        Utils.SetLayer(angelObj.obj, UiManager.Instance.gameCamera.gameObject.layer);
        return(angelObj.obj.transform.GetChild(0).GetComponent <FuBenCardCtrl>());
    }
示例#2
0
 /** 创建坐骑模型 */
 private void createangelModel(Transform parent, AngelSample angel, CallBack <GameObject> callback)
 {
     ResourcesManager.Instance.LoadAssetBundleTexture("angel/" + angel.modelID, parent, (obj) => {
         GameObject gameObj = obj as GameObject;
         Transform temp     = gameObj.transform;
         temp.localPosition = Vector3.zero;
         temp.localRotation = new Quaternion(0, 0, 0, 1);
         temp.localScale    = new Vector3(1, 1, 1);
         if (callback != null)
         {
             callback(gameObj);
         }
     });
 }
    ///<summary>
    /// 根据VIP等级获取当前拥有的天使
    /// </summary>
    public AngelSample getAngelSampleByVipLevel(int Level)
    {
        AngelSample tmp = null;
        AngelSample cur = null;

        foreach (int key in data.Keys)
        {
            cur = getAngelSampleBySid(key);
            if (cur.vipLevelRequired <= Level)
            {
                if (tmp == null || tmp.vipLevelRequired < cur.vipLevelRequired)
                {
                    tmp = cur;
                }
            }
        }
        return(tmp);
    }
示例#4
0
 /* methods */
 /***/
 public void init(WindowBase fatherWindow, AngelSample _angel)
 {
     this.fatherWindow = fatherWindow;
     this.angel        = _angel;
     UpdateUI();
 }