示例#1
0
    // Use this for initialization
    void Start()
    {
        layerTextures    = new Texture[6];
        layerTextures[0] = terrain.renderer.material.GetTexture("_Layer1");
        layerTextures[1] = terrain.renderer.material.GetTexture("_Layer2");
        layerTextures[2] = terrain.renderer.material.GetTexture("_Layer3");
        layerTextures[3] = terrain.renderer.material.GetTexture("_Layer4");
        layerTextures[4] = terrain.renderer.material.GetTexture("_Layer5");
        layerTextures[5] = terrain.renderer.material.GetTexture("_Layer6");

        paths = new GameObject[7];

        browserFadeScript   = GameObject.Find("Scripts").GetComponent <BillboardAndFade>();
        amnesiaFadeScript   = GameObject.Find("Scripts").GetComponent <BillboardAndFadeAmnesiaMode>();
        collisionZoneParent = GameObject.Find("CollisionZones");
        collisionZoneParent.SetActive(false);

        cameraOriginalPos      = firstPersonController.transform.position;
        cameraOriginalRotation = firstPersonController.transform.rotation;

        rotateAmount = 0.0f;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        layerTextures = new Texture[6];
        layerTextures[0] = terrain.renderer.material.GetTexture("_Layer1");
        layerTextures[1] = terrain.renderer.material.GetTexture("_Layer2");
        layerTextures[2] = terrain.renderer.material.GetTexture("_Layer3");
        layerTextures[3] = terrain.renderer.material.GetTexture("_Layer4");
        layerTextures[4] = terrain.renderer.material.GetTexture("_Layer5");
        layerTextures[5] = terrain.renderer.material.GetTexture("_Layer6");

        paths = new GameObject[7];

        browserFadeScript = GameObject.Find ("Scripts").GetComponent<BillboardAndFade>();
        amnesiaFadeScript = GameObject.Find ("Scripts").GetComponent<BillboardAndFadeAmnesiaMode>();
        collisionZoneParent = GameObject.Find ("CollisionZones");
        collisionZoneParent.SetActive(false);

        cameraOriginalPos = firstPersonController.transform.position;
        cameraOriginalRotation = firstPersonController.transform.rotation;

        rotateAmount = 0.0f;
    }