コード例 #1
0
    public IEnumerator LogicP1vP1FightResultCoroutine(P1vP1RewardData data)
    {
        var delay = 0.0f;

        if (data.Result == 1)
        {
            delay = GameUtils.DungeonShowDelay / 1000.0f;
        }
        yield return(new WaitForSeconds(delay));

        //当前不是pvp场景 就不不弹结果对话框了
        var tbScene = Table.GetScene(GameLogic.Instance.Scene.SceneTypeId);

        if (tbScene == null || tbScene.FubenId < 0)
        {
            yield break;
        }
        var tbFuben = Table.GetFuben(tbScene.FubenId);

        if (tbFuben.AssistType != (int)eDungeonAssistType.Pvp1v1)
        {
            yield break;
        }
        var e = new Show_UI_Event(UIConfig.AreanaResult, new ArenaResultArguments {
            RewardData = data
        });

        EventDispatcher.Instance.DispatchEvent(e);
    }
コード例 #2
0
    public void LogicP1vP1FightResult(P1vP1RewardData data)
    {
        var one = new P1vP1Change_One();

        one.Type    = 0;
        one.NewRank = data.NewRank;
        one.OldRank = data.OldRank;
        one.Name    = data.OpponentName;
        var e = new ArenaFightRecoardChange(one);

        EventDispatcher.Instance.DispatchEvent(e);
        StartCoroutine(LogicP1vP1FightResultCoroutine(data));
    }