Example #1
0
        public FeatDialog(Context context, Feat editFeat) : base(context)
        {
            feat = (Feat)editFeat.Clone();

            RequestWindowFeature((int)WindowFeatures.NoTitle);

            SetContentView(Resource.Layout.FeatDialog);
            SetCanceledOnTouchOutside(true);

            OKButton.Click += (sender, e) =>
            {
                Dismiss();
                FeatComplete?.Invoke(this, feat);
            };

            CancelButton.Click += (sender, e) =>
            {
                Dismiss();
            };

            NameText.AttachEditTextString(feat, "Name");
            TypesButton.AttachButtonStringList(feat, "Type", new List <string>(Feat.FeatTypes));
            PrerequisitesText.AttachEditTextString(feat, "Prerequistites");
            BenefitText.AttachEditTextString(feat, "Benefit");
            NormalText.AttachEditTextString(feat, "Normal");
            SpecialText.AttachEditTextString(feat, "Special");

            feat.PropertyChanged += Feat_PropertyChanged;

            EnableOK();
        }
Example #2
0
        public override string ToString()
        {
            string ret = "";

            ret += isSeries > 0 ? "Series of " : "";
            ret += SourceSide.Trim().Length > 0 ? SourceSide.ToLower() + " " : "";
            ret += ActionType.Trim().Length > 0 ? ActionType.ToLower() + " " : "";
            ret += SourcePart.Trim().Length > 0 ? SourcePart.ToLower() + " " : "";
            ret += TransitionText.Trim().Length > 0 ? TransitionText.ToLower() + " " : "";
            ret += DestSide.Trim().Length > 0 ? DestSide.ToLower() + " " : "";
            ret += DestPart.Trim().Length > 0 ? DestPart.ToLower() + " " : "";
            ret += SpecialText.Trim().Length > 0 ? SpecialText.ToLower() + " " : "";
            return(ret);
        }
Example #3
0
    /// <summary>
    /// 盤面に残っているミノの処理&UI表示設定
    /// </summary>
    /// <returns></returns>
    IEnumerator RemainMino_Check()
    {
        //パーフェクト判定の初期化
        m_Perfect = false;
        //
        MA.StageMino_Check(Stage, SetMinoPos);
        //消したライン数
        m_DeleteLine_Value = MA.Line_Check(DELETE_TIME, Stage, m_DeleteLine_Value, SetMinoPos);
        //ミノ列が揃っていなかったら処理を終了させる
        if (m_DeleteLine_Value <= 0)
        {
            GM.state = Game_Manager.State.CREATE_MINO;
            yield break;
        }
        audioSource.PlayOneShot(Sound_Delete);
        yield return(new WaitForSeconds(DELETE_TIME));

        //ミノを下げる処理
        MA.Mino_Down(Stage, ref m_Perfect, ref SetMinoPos);
        //何もない消し方をした時の処理
        if (!m_Perfect && !m_Tspin && m_DeleteLine_Value != MINO_MAXSIZE)
        {
            GM.state = Game_Manager.State.CREATE_MINO;
            yield break;
        }
        //テトリスができた時のUI表示
        if (m_DeleteLine_Value == MINO_MAXSIZE)
        {
            SpecialText.SetActive(true);
            SpecialText.transform.GetComponent <Text>().text = "TETRIS";
        }
        //Tspinができた時のUI表示
        if (m_Tspin)
        {
            SpecialText.SetActive(true);
            string Line_Value = "";
            switch (m_DeleteLine_Value)
            {
            case 1:
                Line_Value = "Single";
                break;

            case 2:
                Line_Value = "Double";
                break;

            case 3:
                Line_Value = "Triple";
                break;

            default:
                break;
            }
            SpecialText.transform.GetComponent <Text>().text = "Tspin\n " + Line_Value;
        }
        //全消し後の処理
        if (m_Perfect)
        {
            PerfectText.SetActive(true);
        }
        yield return(new WaitForSeconds(DELETE_TIME * 2));

        PerfectText.SetActive(false);
        SpecialText.SetActive(false);
        GM.state = Game_Manager.State.CREATE_MINO;
    }