コード例 #1
0
        /// <summary>
        /// パラメータを表示させます
        /// </summary>
        /// <param name="job">J職業</param>
        /// <param name="humanity">人間性</param>
        /// <param name="identities">特徴のリスト</param>
        /// <param name="manager">元となるマネージャ</param>
        public void setParameters(Job job, Humanity humanity, List <Identity> identities, IMissionBuilder builder, CharaMakeManager manager)
        {
            nameField.interactable = false;
            jobText.text           = job.getName();
            humanityText.text      = humanity.getName();
            missionText.text       = builder.getName();
            int i = 0;

            foreach (Text text in identityTexts)
            {
                text.text = identities[i].getName();
                i++;
            }
            this.manager = manager;
        }
コード例 #2
0
        /// <summary>
        /// カーソルの移動移動
        /// </summary>
        private void moveCursor()
        {
            int   axis    = 0;
            float rawAxis = Input.GetAxisRaw("Vertical");

            if (rawAxis > 0)
            {
                axis = -1;
            }
            else if (rawAxis < 0)
            {
                axis = 1;
            }

            if (axis != 0)
            {
                switch (state)
                {
                case CharaMakeState.JOB:
                    int index = jobSelectView.getIndex() + axis;
                    Job job   = jobSelectView.moveTo(index);
                    jobView.printText(job);
                    break;

                case CharaMakeState.HUMANITY:
                    Humanity humanity = humanitySelectView.moveTo(humanitySelectView.getIndex() + axis);
                    parameterView.printText(humanity.getName(), humanity.getDescription(), humanity.getFlavorText());
                    break;

                case CharaMakeState.IDENTITY:
                    Identity identity = identitySelectView.moveTo(identitySelectView.getIndex() + axis);
                    parameterView.printText(identity.getName(), identity.getDescription(), identity.getFlavorText());
                    break;

                case CharaMakeState.MISSION:
                    IMissionBuilder mission = missionSelectView.moveTo(missionSelectView.getIndex() + axis);
                    parameterView.printText(mission.getName(), mission.getDescription(), mission.getFlavorText());
                    break;
                }
            }
        }