예제 #1
0
    private bool SkillSelectTile(BaseSkill skill, Node node)
    {
        m_cameraController.Show(CameraType.Action);
        ResetNodeColor();

        if (skill.MoveToTarget)
        {
            RouteList.Clear();
            FindRouteNode(skill.MaxRangeValue, 0, m_currentPlayer.Poring.Node, null);
            RouteList = FindTargetRoute(RouteList, node);
            int indexRoute = Random.Range(0, RouteList.Count - 1);

            skill.OnActivate(
                poring: m_currentPlayer.Poring,
                targetNode: node,
                nodeList: RouteList[indexRoute]
                );
        }
        else
        {
            skill.OnActivate(
                poring: m_currentPlayer.Poring,
                targetNode: node
                );
        }

        return(true);
    }
예제 #2
0
    private void ReceiveNodeSkillSelected(Node node, BaseSkill skill)
    {
        node.PointRenderer.SetPropertyBlock(MaterialPreset.GetMaterialPreset(EMaterialPreset.selected));
        MagicCursor.Instance.MoveTo(node);
        switch (skill.TargetType)
        {
        case TargetType.Self:
            if (node.TileProperty.Type != TileType.Sanctuary)
            {
                m_cameraController.Show(CameraType.Action);
                ResetNodeColor();
                skill.OnActivate(m_currentPlayer.Poring);
                isSelectedTargetSkill = true;
            }
            break;

        case TargetType.Another:
            if (node.steps.Count > 0 && CheckAnotherPoringInTargetNode(node))
            {
                isSelectedTargetSkill = SkillSelectPoringTarget(skill, node);
            }
            break;

        case TargetType.Tile:
            if (node.steps.Count > 0)
            {
                isSelectedTargetSkill = SkillSelectTile(skill, node);
            }
            break;
        }
    }