Beispiel #1
0
        /// <summary>
        /// 使うが選ばれた時の処理
        /// </summary>
        public void useChose()
        {
            Vector3       windowPos = new Vector3(Screen.width / 2, Screen.height / 2, 0);
            MenuUseWindow useWindow = Instantiate(menuUseWindowPrefab, windowPos, new Quaternion(0, 0, 0, 0)).GetComponent <MenuUseWindow>();

            useWindow.transform.SetParent(CanvasGetter.getCanvasElement().transform);
            useWindow.setState(this, item, party);
            menu.setIsWindowInputing(true);
        }
Beispiel #2
0
        /// <summary>
        /// 初期設定を行います
        /// </summary>
        /// <param name="character">表示するキャラクター</param>
        /// <param name="window">元となるウィンドウ</param>
        public void setState(IPlayable character, MenuUseWindow window)
        {
            this.character = character;
            this.window    = window;

            Debug.Log("character " + character.getName());
            //デバッグ
            character.healed(1, Skill.ActiveSkillParameters.HealSkillAttribute.HP_HEAL);

            nameText.text = character.getName();
        }
Beispiel #3
0
        /// <summary>
        /// 使う対象が決定した時の処理
        /// </summary>
        /// <param name="target">使う対象のリスト</param>
        /// <param name="window">操作された使うウィンドウ</param>
        public void useTargetChose(IPlayable target, MenuUseWindow window)
        {
            item.use(target);

            if (hasStack)
            {
                var stack = (ItemStack)item;
                if (!stack.hasStack())
                {
                    window.cancelChose();
                }
            }
            else
            {
                window.cancelChose();
            }
            Debug.Log("into useChosen " + item.getName());
        }