Exemple #1
0
    public void startLevel(GameObject f)
    {
        fpsconstroller.SetActive(true);
        cam.enabled        = true;
        audio_this.enabled = true;

        room3_controller = GameObject.Find("Room3").GetComponent <Room3Controller>();

        maze_block = GameObject.Find("Room2/MazeCube");
        maze_block.SetActive(true);

        portalA = GameObject.Find("Room2/PortalA").GetComponent <Room2PortalA>();
        portalB = GameObject.Find("Room2/PortalB").GetComponent <Room2PortalB>();
        portalC = GameObject.Find("Room2/PortalC").GetComponent <Room2PortalC>();
        portalD = GameObject.Find("Room2/PortalD").GetComponent <Room2PortalD>();

        light_cube = GameObject.Find("Room2/LightCube").GetComponent <LightCubeController>();
        light_cube.setMaterial(1);

        portalA.init();
        portalB.init();
        portalC.init();
        portalD.init();

        //Debug.Log(f.transform.localPosition.y);
        portalA.init_place(f);

        isbegin = false;

        ms        = GameObject.Find("MainCanvas").GetComponent <MainCanvasSet2>();
        delay_lim = ms.delay_lim;

        key = ms.key;
    }
 public void init()
 {
     rd  = GameObject.Find("Room3/PaintingD").GetComponent <MeshRenderer>();
     fps = GameObject.Find("Room3/RigidBodyFPSController");
     r3  = GameObject.Find("Room3").GetComponent <Room3Controller>();
 }