Esempio n. 1
0
    private void FeatureShow(AssetTask task)
    {
        NewOBJ = true;
        Object temp = task.Obj;

        if (Temp_OBJ != null)
        {
            Destroy(Temp_OBJ);
            Temp_OBJ = null;
        }

        if (temp != null)
        {
            Temp_OBJ = Instantiate(temp, StageOBJ.transform.position, Quaternion.Euler(new Vector3(0, 180, 0))) as GameObject;
        }
        else
        {
            temp     = PrefabLoader.loadFromUnPack("CRLuo/pbXXX", false, false);
            Temp_OBJ = Instantiate(temp, StageOBJ.transform.position, Quaternion.Euler(new Vector3(0, 180, 0))) as GameObject;
        }

        StageOBJ.transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0));

        Temp_OBJ.transform.parent = StageOBJ.transform;

        CRLuo = Temp_OBJ.GetComponent <CRLuo_PlayAnim_FX>();
        CRLuo.CameraKey_Attack     = false;
        CRLuo.CameraKey_GroupSkill = false;
        CRLuo.CameraKey_OverSkill  = false;
        CRLuo.CameraKey_Skill      = false;

        if (attri == MonsterAttribute.ALL)
        {
            CRLuo.AddGoldenGlow();
        }

        CRLuo.BodyFX_ON_OFF(this.mAllFated);
    }
Esempio n. 2
0
    private void FeatureShow(AssetTask task)
    {
        Object temp = task.Obj;

        if (Temp_OBJ != null)
        {
            Destroy(Temp_OBJ);
            Temp_OBJ = null;
        }

        if (temp != null)
        {
            Temp_OBJ = Instantiate(temp, transform.position, Quaternion.Euler(new Vector3(0, 180, 0))) as GameObject;
        }
        else
        {
            temp     = PrefabLoader.loadFromUnPack("CRLuo/pbXXX", false, false);
            Temp_OBJ = Instantiate(temp, transform.position, Quaternion.Euler(new Vector3(0, 180, 0))) as GameObject;
        }

        Temp_OBJ.transform.parent = transform;

        SkinnedMeshRenderer mesh = Temp_OBJ.GetComponentInChildren <SkinnedMeshRenderer>();

        if (mesh != null)
        {
            if (mesh.bounds.extents.y > MAX_SIZE)
            {
//				RED.LogWarning ("大模型  " + mesh.bounds.extents.y);
                Temp_OBJ.transform.localScale = mesh.bounds.extents.y / MAX_SIZE * Vector3.one;
            }
            else if (mesh.bounds.extents.y < MIN_SIZE)
            {
//				RED.LogWarning ("小模型  " + mesh.bounds.extents.y);
                Temp_OBJ.transform.localScale = MIN_SIZE / mesh.bounds.extents.y * Vector3.one;
            }
            else
            {
//				RED.LogWarning ("正常模型  " + mesh.bounds.extents.y);
                Temp_OBJ.transform.localScale = Vector3.one;
            }
        }
        else
        {
            RED.LogWarning("mesh is null ");
        }

        ShadowAnim shadow = Temp_OBJ.GetComponentInChildren <ShadowAnim>();

        if (shadow != null)
        {
            shadow.enabled = false;
            shadow.transform.localPosition = Vector3.zero;
        }

        CRLuo = Temp_OBJ.GetComponent <CRLuo_PlayAnim_FX>();
        CRLuo.CameraKey_Attack     = false;
        CRLuo.CameraKey_GroupSkill = false;
        CRLuo.CameraKey_OverSkill  = false;
        CRLuo.CameraKey_Skill      = false;

        if (attri == MonsterAttribute.ALL)
        {
            CRLuo.AddGoldenGlow();
        }

        CRLuo.BodyFX_ON_OFF(this.mAllFated);
    }