Example #1
0
 private void RandomData()
 {
     MainWindow.m_yin              = YinData.GetYinRandom();
     textBlockMain.Text            = m_yin.ping;
     textBlockMainPianJia.Text     = m_yin.pian;
     textBlockMainLuoMa.Text       = m_yin.pronunciation;
     textBlockMainLuoMa.Foreground = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
 }
Example #2
0
    private void DealYinKeyDown(string yinName, Yin yin, GameEntity e, GameEntity yinListUi)
    {
        if (!e.isMakingYin)
        {
            e.isMakingYin = true;
            foreach (var ui in _context.GetGroup(GameMatcher.UiRootId))
            {
                if (!ui.hasName)
                {
                    continue;
                }
                if (ui.name.text != "NinjutsuQTE")
                {
                    continue;
                }

                ui.ReplaceActive(true);
                break;
            }
        }

        e.yinList.list.Add(yin);
//        e.ReplaceChaKuRaExpend(1.0f);
        var newChaKuRaExpend = new MatchDataChaKuRaExpendControl
        {
            matchId       = _context.currentMatchData.value.customMatchId,
            userId        = _context.currentPlayerId.value,
            chaKuRaExpend = 1.0f
        };

        _context.CreateEntity().ReplaceSendMatchData(1007, Utilities.ToJson(newChaKuRaExpend));


        var uiName = "NinjutsuYin_" + yinName + "_" + _context.currentInNumber.value;
        var yinUI  = _context.CreateEntity();

        yinUI.ReplaceName(uiName);
        yinUI.ReplaceParentEntity(yinListUi);
        yinUI.ReplaceUiOpen("NinjutsuYin" + yinName);
        yinUI.ReplaceUiMoveAction(uiName, false, new Vector2(_context.currentInNumber.value * 100, 0), 0.5f * (9 - _context.currentInNumber.value) / 9);
        yinUI.ReplaceUiFadeAction(uiName, 1.0f, 0.2f);

        _context.ReplaceCurrentInNumber(_context.currentInNumber.value + 1);
    }
Example #3
0
 public Yang(Yin yin)
 {
     Yin = yin;
 }