示例#1
0
 public void ChangeExtentType()
 {
     _abstractMap.SetExtent(MapExtentType.CameraBounds);
 }
示例#2
0
    private IEnumerator Transition()
    {
        while (true)
        {
            if (phase == 1)
            {
                if (mapVariable.Zoom >= Phase1.instance.getMaxZoom())
                {
                    mapVariable.SetExtent(MapExtentType.RangeAroundCenter);
                    fog.GetComponent <ImageFade>().FadeImage();
                    yield return(new WaitForSeconds(1));

                    frontCamera.gameObject.SetActive(!frontCamera.gameObject.activeSelf);
                    panoCamera.gameObject.SetActive(!panoCamera.gameObject.activeSelf);
                    fog.GetComponent <ImageFade>().FadeImage();
                    yield return(new WaitForSeconds(1));

                    boarder.GetComponent <Animator>().SetTrigger("FadeIn");
                    phase = 2;
                }
            }
            else if (phase == 2)
            {
                // 90 degree:   -0.7071068
                // 80 degree:   -0.6427876
                // 70 degree:   -0.5735764
                // 60 degree:   -0.5
                if (focalPoint.transform.rotation.x <= -0.5)
                {
                    Phase3.instance.UI.gameObject.SetActive(!Phase3.instance.UI.gameObject.activeSelf);
                    Phase3.instance.berm.SetActive(!Phase3.instance.berm.activeSelf);
                    Phase3.instance.testbed.SetActive(!Phase3.instance.testbed.activeSelf);
                    Phase3.instance.thorns.SetActive(!Phase3.instance.thorns.activeSelf);

                    phase = 3;
                }
            }
            else if (phase == 3)
            {
                if (Phase3.instance.next == true)
                {
                    Phase3.instance.UI.gameObject.SetActive(!Phase3.instance.UI.gameObject.activeSelf);
                    Phase3.instance.berm.SetActive(!Phase3.instance.berm.activeSelf);
                    Phase3.instance.testbed.SetActive(!Phase3.instance.testbed.activeSelf);
                    Phase3.instance.thorns.SetActive(!Phase3.instance.thorns.activeSelf);


                    foreach (Transform child in map.transform)
                    {
                        //child is your child transform
                        if (child.name == "15/6935/13268" || child.name == "15/6936/13268" || child.name == "15/6937/13268")
                        {
                            child.gameObject.SetActive(false);
                        }
                    }



                    phase = 4;
                }
            }
            yield return(null);
        }
    }