コード例 #1
0
 public QuoteSet()
 {
     QuoteStyle          = QuoteStyles.BattleStart;
     QuoteSetName        = "";
     QuoteSetUseLast     = false;
     QuoteSetChoice      = QuoteSetChoices.Random;
     QuoteSetChoiceValue = 0;
     CustomText          = "";
 }
コード例 #2
0
ファイル: Quote.cs プロジェクト: keel-210/DesktopMascot4VRM
    void QuoteEnter(QuoteStyles styles, int ctrlIndex)
    {
        switch (styles.quoteStyle)
        {
        case QuoteStyle.OnlyOne:
            quoteCtrl[ctrlIndex].PlaceQuoteOnBone(styles);
            if (quoteCtrl[ctrlIndex].list.Count > 0)
            {
                while (quoteCtrl[ctrlIndex].list.Count != 0)
                {
                    QuoteExit(quoteCtrl[ctrlIndex].list[0], ctrlIndex);
                }
            }
            break;

        case QuoteStyle.Time:
            quoteCtrl[ctrlIndex].PlaceQuoteOnBone(styles);
            StartCoroutine(this.DelayMethod(3f, () => { QuoteExit(styles, ctrlIndex); }));
            break;

        case QuoteStyle.List:
            if (quoteCtrl[ctrlIndex].list.Count > styles.ListMax - 1)
            {
                QuoteExit(quoteCtrl[ctrlIndex].list[0], ctrlIndex);
            }
            quoteCtrl[ctrlIndex].UpdateList(styles);
            break;

        default:
            break;
        }
        switch (styles.alphaStyle)
        {
        case AlphaStyle.AlphaAlpha:
        case AlphaStyle.AlpahDefault:
            AlphaController alpha = styles.panel.gameObject.AddComponent <AlphaController>();
            alpha.Init(styles.alphaTime, 0, false);
            break;
        }
        if (styles.moveDirection != Vector3.zero)
        {
            RectPositionMover rect = styles.panel.gameObject.AddComponent <RectPositionMover>();
            rect.Init(-styles.moveDirection, Vector3.zero, 0, styles.moveTime);
        }
        quoteCtrl[ctrlIndex].list.Add(styles);
    }
コード例 #3
0
ファイル: Quote.cs プロジェクト: keel-210/DesktopMascot4VRM
    void QuoteExit(QuoteStyles styles, int ctrlIndex)
    {
        quoteCtrl[ctrlIndex].list.Remove(styles);
        switch (styles.alphaStyle)
        {
        case AlphaStyle.AlphaAlpha:
        case AlphaStyle.DefaultAlpha:
            AlphaController alpha = styles.panel.gameObject.AddComponent <AlphaController>();
            alpha.Init(styles.alphaTime, 0, true);
            styles.panel.gameObject.AddComponent <AlphaDestroy>();
            break;

        default:
            Debug.Log("Delete");
            Destroy(styles.panel.gameObject, styles.alphaTime >= styles.moveTime ? styles.alphaTime : styles.moveTime);
            break;
        }
        if (styles.moveDirection != Vector3.zero)
        {
            RectPositionMover rect = styles.panel.gameObject.AddComponent <RectPositionMover>();
            rect.Init(Vector3.zero, styles.moveDirection, 0, styles.moveTime);
        }
    }
コード例 #4
0
 public void PlaceQuoteOnBone(QuoteStyles styles)
 {
     styles.panel.position = Camera.main.WorldToScreenPoint(anim.GetBoneTransform(styles.bone).position) + styles.PosOffset;
 }