コード例 #1
0
    private bool isClickedOnBorder;            //is there a click on a border

    // Use this for initialization
    IEnumerator Start()
    {
        if (cam == null)
        {
            cam = Camera.main;
        }

        isMobile             = PlatformChecker.IsAndroid() || PlatformChecker.IsIOS();
        firstStageInitailPos = firstStage.position;
        lastStageInitailPos  = lastStage.position;
        sliderInitialPos     = transform.position;

        if (sliderDotsComp == null)
        {
            sliderDotsComp = GameObject.Find("SliderDots").GetComponent <SliderDots> ();
        }

        lastPos     = prevPos = Vector3.zero;
        obTransform = transform;

        if (centerPoint == null)
        {
            centerPoint = GameObject.Find("Center").transform;
        }
        SetImages(1);
        stageCount = obTransform.childCount;
        yield return(0);
    }
コード例 #2
0
ファイル: SliderManager.cs プロジェクト: finian826/Unity-A-Z
    // Use this for initialization
    IEnumerator Start()
    {
        if (cam == null) {
                        cam = Camera.main;
                }

                isMobile = PlatformChecker.IsAndroid () || PlatformChecker.IsIOS ();
                firstStageInitailPos = firstStage.position;
                lastStageInitailPos = lastStage.position;
                sliderInitialPos = transform.position;

                if (sliderDotsComp == null) {
                        sliderDotsComp = GameObject.Find ("SliderDots").GetComponent<SliderDots> ();
                }

                lastPos = prevPos = Vector3.zero;
                obTransform = transform;

                if (centerPoint == null) {
                        centerPoint = GameObject.Find ("Center").transform;
                }
                SetImages (1);
                stageCount = obTransform.childCount;
                yield return 0;
    }