Exemplo n.º 1
0
    public override void OnRefresh()
    {
        var deploy = EnemyDeploy.GetInfo(m_EnemyId);

        m_UI.m_LabelName.SetText(deploy.Name);
        m_UI.m_LabelContent.SetText(deploy.FightContent);
        m_UI.m_LoaderHead.icon = UIUtil.GetEnemyHeadUrl(m_EnemyId);
    }
Exemplo n.º 2
0
    protected void AddTeam(int id, ETeamType type)
    {
        var team = new TeamController();

        team.TeamType = type;
        m_TeamList.Add(team);

        if (type == ETeamType.LeftSide)
        {
            var pupilId   = AdventureProxy.instance.GetData().PupilId;
            var pupilInfo = PupilProxy.instance.getPupilInfo(pupilId);
            var wuxue     = pupilInfo.GetEquipingWuXue();

            var character = team.AddCharacter(1, pupilId);
            character.TeamType = type;
            character.InitHp(200, 200);
            character.SkillId = wuxue != null ? wuxue.Id : 0;

            var normalAttack = new NormalAttack();
            normalAttack.AttackCount  = 1;
            normalAttack.AttackHurt   = 20;
            normalAttack.AttackTarget = null;
            character.InitNormalAttack(normalAttack);

            var skillAttack = new SkillAttack();
            skillAttack.AttackCount  = 4;
            skillAttack.AttackHurt   = 10;
            skillAttack.AttackTarget = null;
            skillAttack.SkillId      = character.SkillId;
            character.InitSkillAttack(skillAttack);
        }
        else
        {
            var character = team.AddCharacter(2, m_EnemyId);
            character.TeamType = type;
            character.InitHp(200, 200);
            character.SkillId = EnemyDeploy.GetInfo(m_EnemyId).SkillEffectId;

            var normalAttack = new NormalAttack();
            normalAttack.AttackCount  = 1;
            normalAttack.AttackHurt   = 10;
            normalAttack.AttackTarget = null;
            character.InitNormalAttack(normalAttack);

            var skillAttack = new SkillAttack();
            skillAttack.AttackCount  = 4;
            skillAttack.AttackHurt   = 5;
            skillAttack.AttackTarget = null;
            skillAttack.SkillId      = character.SkillId;
            character.InitSkillAttack(skillAttack);
        }
    }
Exemplo n.º 3
0
    private void OnRefreshEnemyInfo()
    {
        var enemyDeploy = EnemyDeploy.GetInfo(m_EnemyId);

        m_UI.m_RightCharacterInfo.m_LabelName.SetText(enemyDeploy.Name);
        m_UI.m_RightCharacterInfo.m_LabelLevel.SetValue(enemyDeploy.Level);
        m_UI.m_RightCharacterInfo.m_LabelCombat.SetText(enemyDeploy.Combat);
        if (enemyDeploy.SkillEffectId > 0)
        {
            m_UI.m_RightSkillInfo.visible = true;
            var wuxueDeploy = SkillEffectDeploy.GetInfo(enemyDeploy.SkillEffectId);
            m_UI.m_RightSkillInfo.m_LabelName.SetText(wuxueDeploy.Name);
            m_UI.m_RightSkillInfo.m_LoaderIcon.url = UIUtil.GetUniqueSkillEffectUrl(enemyDeploy.SkillEffectId);
            m_UI.m_LabelRightSkillName.SetText(wuxueDeploy.Name);
        }
        else
        {
            m_UI.m_RightSkillInfo.visible = false;
        }
    }