示例#1
0
    public void ChoosePath()
    {
        m_CurrentEdge.GetEdgeResource().SetNormal();

        new CameraFollowEvent().Push();

        switch (m_MoveType)
        {
        case EEdgeType.Normal:
            m_Player.OnNormalEdge(m_CurrentEdge);
            break;

        case EEdgeType.Combat:
            new OnEdgeBattleGameEvent(true, m_CurrentEdge).Push();
            m_Player.OnEdge(m_CurrentEdge, true);
            break;

        case EEdgeType.Obstacle:
            break;

        case EEdgeType.Diversion:
            new OnDiversionEvent().Push();
            m_Player.OnEdge(m_CurrentEdge, true);
            break;
        }

        gameObject.SetActive(false);
        UpdaterProxy.Get().SetPause(false);
    }
示例#2
0
    public void OnGameEvent(OnEdgeClick edgeEvent)
    {
        gameObject.SetActive(true);
        UpdaterProxy.Get().SetPause(true);
        m_CurrentEdge = edgeEvent.GetEdge();
        m_ChoosePathButton.interactable = m_Player.CanMoveToEdge(m_CurrentEdge);

        EdgeResource tempEdgeResource = m_CurrentEdge.GetEdgeResource();

        switch (tempEdgeResource.GetEdgeType())
        {
        case EEdgeType.Normal:
            m_MoveType = EEdgeType.Normal;
            break;

        case EEdgeType.Combat:
            if (TeamManagerProxy.Get().IsNotTooMuchCharacters(tempEdgeResource.GetEdgeCharacterNumber()))
            {
                m_MoveType = EEdgeType.Normal;
            }
            else
            {
                m_MoveType = EEdgeType.Combat;
            }
            break;

        case EEdgeType.Obstacle:
            if (TeamManagerProxy.Get().IsCharacterClass(tempEdgeResource.GetEdgeCharacterClass()))
            {
                m_MoveType = EEdgeType.Normal;
            }
            else
            {
                m_MoveType = EEdgeType.Obstacle;
                m_ChoosePathButton.interactable = false;
            }
            break;

        case EEdgeType.Diversion:
            if (TeamManagerProxy.Get().IsNotTooMuchCharacters(tempEdgeResource.GetEdgeCharacterNumber()))
            {
                m_MoveType = EEdgeType.Normal;
            }
            else
            {
                m_MoveType = EEdgeType.Diversion;
            }
            break;
        }

        m_Description.text = tempEdgeResource.GetDescription();
    }