Пример #1
0
    private void UpdateCurrentFilmNum()
    {
        if (AxisStateManager.GetInstance().GetAxisDown("HorizontalForChangeFilm") == 1.0f)
        {
            --currentFilmNum;
        }
        else if (AxisStateManager.GetInstance().GetAxisDown("HorizontalForChangeFilm") == -1.0f)
        {
            ++currentFilmNum;
        }

        this.currentFilmNum = (this.currentFilmNum + this.maxFilm) % this.maxFilm;
    }
Пример #2
0
 void Start()
 {
     manager = AxisStateManager.GetInstance();
 }
Пример #3
0
    void Update()
    {
        //フィルム選択の更新
        UpdateCurrentFilmNum();

        //選択フィルム変更
        if (this.prevFilmNum != this.currentFilmNum)
        {
            SoundManager.GetInstance().Play("SE_FilmToSwitch", SoundManager.PLAYER_TYPE.NONLOOP, true);

            int influenceNum = this.currentFilmNum - this.prevFilmNum;
            int direction    = influenceNum / Math.Abs(influenceNum);

            float halfSize = this.films[this.currentFilmNum].Image.GetComponentInParent <RectTransform>().sizeDelta.x / 2;

            //縮小、移動
            this.films[this.prevFilmNum].Image.transform.parent.localScale     = Vector3.one;
            this.films[this.prevFilmNum].Image.transform.parent.localPosition += new Vector3(halfSize * -direction, 0, 0);

            //移動
            for (int i = this.prevFilmNum + direction; i != currentFilmNum; i += direction)
            {
                this.films[i].Image.transform.parent.localPosition += new Vector3(this.films[i].Image.GetComponentInParent <RectTransform>().sizeDelta.x * -direction, 0, 0);
            }

            //拡大、移動
            this.films[this.currentFilmNum].Image.transform.parent.localScale     = new Vector3(2.0f, 2.0f, 1.0f);
            this.films[this.currentFilmNum].Image.transform.parent.localPosition += new Vector3(halfSize * -direction, 0, 0);

            ChangeSilhouette(CurrentFilm);
        }

        //phantom全消し
        if (Input.GetButtonDown("ForDeleteAllPhantom"))
        {
            foreach (var phantom in this.phantoms)
            {
                DeletePhantom(phantom);
            }
        }

        if (CurrentFilm.Obj != null)
        {
            //SilhouetteModeの変更
            if (Input.GetButtonDown("ForSilhouetteMode"))
            {
                this.isSilhouetteMode = !this.isSilhouetteMode;
                this.guideEffect.SetActive(!this.guideEffect.activeSelf);
                ChangeSilhouette(CurrentFilm);
            }

            if (this.isSilhouetteMode)
            {
                UpdateSilhouette();
            }

            //写真、オブジェクトの回転
            if (AxisStateManager.GetInstance().GetAxisDown("ForRotatePicture") != 0)
            {
                CurrentFilm.Image.transform.Rotate(new Vector3(0.0f, 0.0f, Input.GetAxisRaw("ForRotatePicture") * -90.0f));
                CurrentFilm.Obj.transform.Rotate(this.CurrentFilm.Axis * Input.GetAxisRaw("ForRotatePicture"), 90.0f, Space.Self);
            }

            //現像
            if ((Input.GetButtonDown("ForDevelopPhantom") || AxisStateManager.GetInstance().GetAxisDown("ForDevelopPhantom") == 1) &&
                this.isSilhouetteMode)
            {
                if (silhouette.Obj.GetComponent <ObjectAttribute>().CanPhantom)
                {
                    DevelopPhantom();
                }
            }
        }

        prevFilmNum = currentFilmNum;
    }