Пример #1
0
    public void StartFight(Vector2 fightTilePoint, int enemyId)
    {
        m_EnemyId = enemyId;
        m_TeamList.Clear();
        m_FightTilePoint = fightTilePoint;
        AddTeam(0, ETeamType.LeftSide);
        AddTeam(1, ETeamType.RightSide);

        FightView = WinCenter.inst.TransView <UIFightView>(enemyId);
        foreach (var teamController in m_TeamList)
        {
            foreach (var characterController in teamController.CharacterList)
            {
                if (teamController.TeamType == ETeamType.LeftSide)
                {
                    characterController.InitView(FightView.AddLeft(), ETeamType.LeftSide, AdventureProxy.instance.GetData().PupilId);
                }
                else if (teamController.TeamType == ETeamType.RightSide)
                {
                    characterController.InitView(FightView.AddRight(), ETeamType.RightSide, enemyId);
                }
            }
        }

        m_StateMachine.ChangeState(FightPrepareState.Inst);
        AudioManager.inst.PlayBgAudio("Fight");
    }
Пример #2
0
    public void EnterFight()
    {
        uiManager.CloseAllView();
        FightView fightView = new FightView(this);

        uiManager.ShowView(fightView.view);
        fightManager.CreateFight();
    }