Пример #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        if (GUILayout.Button("重置并生成战场"))
        {
            MapManager_Battle origin = (MapManager_Battle)target;
            origin.ClearMap();
            origin.GenerateMap();
        }
    }
Пример #2
0
    //单位行动开始,显示移动范围,可攻击目标
    public void PlayerActionStart(Unit _unit)
    {
        GameManager.gameState = GameState.playerControl;

        //获取并高亮单位可行动的节点
        NodeSelector.GetUnitActionNodes(_unit);
        NodeSelector.HighlightUnitActionNodes();

        //将当前鼠标高亮节点,触发高亮事件
        MapManager_Battle map = BattleManager.instance.map;

        if (BattleNodeMgr.instance.playerHovered != null)
        {
            map.OnNodeHovered(BattleNodeMgr.instance.playerHovered);
        }
    }