示例#1
0
    public void Generate(Transform initial, CRIType type, Transform [] ways = null, Vector3 [] waysVector3 = null, int _quantity = 1)
    {
        for (int i = 0; i < _quantity; i++)
        {
            switch (type)
            {
            case CRIType.ExplodeCRI:
            {
                GameObject explodeCRIObject = UtilFunction.ResourceLoad(EXPLODE_CRI_PATH) as GameObject;
                explodeCRIObject.transform.position = initial.position;
                explodeCRIObject.transform.rotation = initial.rotation;

                ExplodeCRINew ExplodeCRIScript = explodeCRIObject.GetComponent <ExplodeCRINew> ();
                ExplodeCRIScript.Load(initial, ways);
                _survivalExplodeCRI.Add(ExplodeCRIScript);
            }
            break;

            case CRIType.ShootintModelCRI:
            {
                //GameObject shootintModelCRIObject = UtilFunction.ResourceLoad (SHOOTINGMODEL_CRI_PATH) as GameObject;
                //ShootingModeCRI shootintModelCRIScript = shootintModelCRIObject.GetComponent<ShootingModeCRI> ();
                //shootintModelCRIScript.Init (waysVector3);
                //shootintModelCRIObject.transform.position = initial.position;
                //shootintModelCRIObject.transform.rotation = initial.rotation;

                //_survivalShootingModeCRI.Add (shootintModelCRIScript);
            }
            break;

            default:
                break;
            }
        }
    }
示例#2
0
    public void Generate(Transform initial, Transform[] ways = null, int _quantity = 1)
    {
        for (int i = 0; i < _quantity; i++)
        {
            GameObject explodeCRIObject = Instantiate(CRIYuZhiTi);
            explodeCRIObject.transform.position = initial.position;
            explodeCRIObject.transform.rotation = initial.rotation;

            ExplodeCRINew ExplodeCRIScript = explodeCRIObject.GetComponent <ExplodeCRINew>();
            ExplodeCRIScript.Load(Level_10_Manager.Instance.playerGO.transform, ways);
            CRIS.Add(ExplodeCRIScript);
        }
    }