コード例 #1
0
        // Use this for initialization
        void Start()
        {
            var buttonList = _characterButtonParent.Descendants().OfComponent <Button>().ToList();

            foreach (var button in buttonList)
            {
                var objName = button.gameObject.name;
                button.OnClickEtension(() =>
                {
                    // select character type
                    {
                        var selectCharacterType = (GameInfoManager.CharacterType)Enum.Parse(typeof(GameInfoManager.CharacterType), objName);
                        GameInfoManager.PlayerSelectCharacterType = selectCharacterType;
                        GameInfoManager.EnemySelectCharacterType  = selectCharacterType == GameInfoManager.CharacterType.Heroine ? GameInfoManager.CharacterType.Kohaku : GameInfoManager.CharacterType.Heroine;
                    }

                    // set novel info
                    {
                        var novelInfo = new GameInfoManager.NovelInfo();
                        {
                            novelInfo.Type        = GameInfoManager.NovelInfo.NovelType.Normal;
                            novelInfo.No          = 1;
                            novelInfo.IsSceneView = false;
                        }
                        GameInfoManager.SetCurrentNovelInfo(novelInfo);
                    }

                    // change scene
                    TransitionSceneManager.Instance.TransitionScene("Novel");
                });
            }
        }
コード例 #2
0
        // Use this for initialization
        void Start()
        {
            _closeButton.OnClickEtension(() =>
            {
                var dialogInfo = new DialogUtility.DialogInfo();
                {
                    dialogInfo.DialogType             = DialogUtility.DialogType.MessageDialog;
                    dialogInfo.Message                = "Finish Scene Select ?";
                    dialogInfo.OkCancelButtonCallback = (bool isOk) =>
                    {
                        if (isOk)
                        {
                            TransitionSceneManager.Instance.TransitionScene("Title");
                        }
                    };
                }
                DialogManager.Instance.CreateDialog(dialogInfo);
            });

            var buttonList = _buttonParent.Descendants().OfComponent <Button>().ToList();

            foreach (var button in buttonList)
            {
                var buttonTemp = button;
                button.OnClickEtension(() =>
                {
                    var novelType = GameInfoManager.NovelInfo.NovelType.None;
                    var novelNo   = 0;

                    var objName = buttonTemp.gameObject.name;
                    if (objName.StartsWith("Special"))
                    {
                        novelType = GameInfoManager.NovelInfo.NovelType.Special;
                        objName   = objName.Remove(0, 7);
                        novelNo   = int.Parse(objName);
                    }
                    else if (objName.StartsWith("Normal"))
                    {
                        novelType = GameInfoManager.NovelInfo.NovelType.Normal;
                        objName   = objName.Remove(0, 6);
                        novelNo   = int.Parse(objName);
                    }

                    if (novelType != GameInfoManager.NovelInfo.NovelType.None && novelNo != 0)
                    {
                        var novelInfo = new GameInfoManager.NovelInfo();
                        {
                            novelInfo.Type        = novelType;
                            novelInfo.No          = novelNo;
                            novelInfo.IsSceneView = true;
                        }
                        GameInfoManager.SetCurrentNovelInfo(novelInfo);

                        // シーン遷移
                        TransitionSceneManager.Instance.TransitionScene("Novel");
                    }
                });
            }
        }
コード例 #3
0
        private void GameClear()
        {
            // set novel info
            {
                var novelInfo = new GameInfoManager.NovelInfo();
                {
                    novelInfo.Type        = GameInfoManager.NovelInfo.NovelType.Special;
                    novelInfo.No          = 1;
                    novelInfo.IsSceneView = false;
                }
                GameInfoManager.SetCurrentNovelInfo(novelInfo);
            }

            // 移動&アニメーション
            {
                var playerList = _playerUi.GetPlayerScriptList();
                foreach (var player in playerList)
                {
                    player.ChangeGravityEnable(false);
                }
                _enemyScript.ChangeGravityEnable(false);
                _fuckImage.gameObject.SetActive(true);

                var seq = DOTween.Sequence();
                {
                    seq.Append(playerList[0].gameObject.transform.DOMove(new Vector3(-6.0f, -1.5f, 0), 1.0f));
                    seq.Join(_enemyScript.gameObject.transform.DOMove(new Vector3(-3.0f, -1.5f, 0), 1.0f));
                    seq.Join(_fuckImage.DOFade(1.0f, 1.0f));
                    seq.AppendCallback(() =>
                    {
                        playerList[0].AppealWin();
                        _enemyScript.AppealDown();
                        _novelSceneAsyncOperation.allowSceneActivation = true;
                    });
                }
            }
        }