예제 #1
0
    public void Open()
    {
        Vector2 point1 = _imageList[0].localPosition;
        Vector2 point2 = _imageList[1].localPosition;

        _nowTime += Time.deltaTime;
        _imageList[0].localPosition = Vector3.Lerp(_imageList[0].localPosition, new Vector3(-1500, point1.y, 0), Time.deltaTime * _speed);
        _imageList[1].localPosition = Vector3.Lerp(_imageList[1].localPosition, new Vector3(1500, point2.y, 0), Time.deltaTime * _speed);
        if (_nowTime > _speed * 2)
        {
            _imageList[0].localPosition = new Vector3(-1500, point1.y, 0);
            _imageList[1].localPosition = new Vector3(1500, point1.y, 0);
            _mode    = DIRECT.NON;
            _nowTime = 0;
        }
    }
예제 #2
0
    public void downOpen()
    {
        Vector2 point1 = _imageList[0].localPosition;
        Vector2 point2 = _imageList[1].localPosition;

        _nowTime += Time.deltaTime;
        _imageList[0].localPosition = Vector3.Lerp(_imageList[0].localPosition, new Vector3(-500, point1.y, 0), Time.deltaTime * _speed);
        _imageList[1].localPosition = Vector3.Lerp(_imageList[1].localPosition, new Vector3(500, point2.y, 0), Time.deltaTime * _speed);
        if (_nowTime > _speed * 2)
        {
            NextScene(_id);
            _imageList[0].localPosition = new Vector3(-500, point1.y, 0);
            _imageList[1].localPosition = new Vector3(500, point1.y, 0);
            _mode    = DIRECT.END;
            _nowTime = 0;
        }
    }
예제 #3
0
 public void SetDirect(DIRECT mode)
 {
     _mode = mode;
 }