public void SetFollowTarget(int area_id) { Vector3 t = Vector3.zero; foreach (var item in Main.Inst.lv_ctrl.map_data.list_area_grid[area_id].list) { t += Main.Inst.chess_grids[item].transform.position; } t /= Main.Inst.lv_ctrl.map_data.list_area_grid[area_id].list.Count; t.z = BoardZ; m_follow_pos = BoardPos - t; follow_type = eCameraFollow.Area; }
//TODO 临时镜头恢复功能 void KeyboardInput() { if (Input.GetKeyDown(KeyCode.C) && Input.GetKey(KeyCode.LeftCommand) || Input.GetKey(KeyCode.LeftControl)) { if (m_follow_chess != null) { follow_type = eCameraFollow.Chess; } } if (Input.GetKeyDown(KeyCode.A) && Input.GetKey(KeyCode.LeftCommand) || Input.GetKey(KeyCode.LeftControl)) { follow_type = eCameraFollow.Area; } }
public void SetFollowTarget(Chess cs) { m_follow_chess = cs; follow_type = eCameraFollow.Chess; }
public void CameraStuck() { follow_type = eCameraFollow.Stuck; }