Esempio n. 1
0
    void Start()
    {
        //player = GameObject.Find("char");

        offset = transform.position - player.transform.position;
        //Debug.Log(offset);

        playerController = player.GetComponent <PlyrMoveController>();
    }
Esempio n. 2
0
    void Start()
    {
        switch01   = GameObject.Find("switch_1");
        switch02   = GameObject.Find("switch_2");
        switch03   = GameObject.Find("switch_3");
        switchDoor = GameObject.Find("switch_door");
        switch04   = GameObject.Find("switch_4");


        water00 = GameObject.Find("water_00");
        water01 = GameObject.Find("water_01");
        water02 = GameObject.Find("water_02");

        boat       = GameObject.Find("boat");
        player     = GameObject.Find("player");
        mainCamera = GameObject.Find("Main Camera");

        offset = transform.position - mainCamera.transform.position;

        s1 = switch01.GetComponent <SwitchController>();
        s2 = switch02.GetComponent <SwitchController>();
        s3 = switch03.GetComponent <SwitchController>();
        s4 = switch04.GetComponent <SwitchController>();

        sd = switchDoor.GetComponent <SwitchController>();

        w0 = water00.GetComponent <WaterController>();
        w1 = water01.GetComponent <WaterController>();
        w2 = water02.GetComponent <WaterController>();

        bc = boat.GetComponent <BoatController>();
        pc = player.GetComponent <PlyrMoveController>();
        cc = mainCamera.GetComponent <CameraController>();

        gameElements = GameObject.Find("GameElements");
        menuposition = GameObject.Find("menuposition");

        //clone.transform.position = cannon.transform.position;

        items = new List <GameObject>();
        items.Add(createLife());
        items.Add(createLife());
        items.Add(createLife());

        //MountMenu();

        goToSavePoint();
    }