Browse Source

同步改动调整楼层切换视角

develop
杨栋梁 4 years ago
parent
commit
8bb70dd403
  1. 2
      Assets/MscPublic/Assets/Scripts/MainScene/FloorControlModule/UIFloor.cs
  2. 6
      Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs
  3. 13
      Assets/Scripts/DongYouLiQing/4GMap/FourthGCamCtrl.cs
  4. 7
      Assets/Scripts/DongYouLiQing/4GMap/QuadCamera.cs
  5. 15
      Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs
  6. 4
      Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs

2
Assets/MscPublic/Assets/Scripts/MainScene/FloorControlModule/UIFloor.cs

@ -28,7 +28,7 @@ public class UIFloor : BaseToggle
public GameObject HasChild;//显示该建筑(区域)下的所有楼层 public GameObject HasChild;//显示该建筑(区域)下的所有楼层
public Transform MyTarget; public Transform MyTarget;
//private CameraManager cameraManager; //private CameraManager cameraManager;
private float FollowCameraDistance = 100f; private float FollowCameraDistance = 250f;
private CameraManager cameraManager; private CameraManager cameraManager;
private Transform P_AllParent; private Transform P_AllParent;
private void Start() private void Start()

6
Assets/Scripts/Common/Disasters/Wound_Trapped/TrappedMoveFree.cs

@ -186,7 +186,7 @@ public class TrappedMoveFree : MonoBehaviour
public void OnEnable() public void OnEnable()
{ {
//MessageDispatcher.AddListener("SetGuidpathIndex", AddGuidIndex); //MessageDispatcher.AddListener("SetGuidpathIndex", AddGuidIndex);
MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute); // MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute);
MessageDispatcher.AddListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.AddListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped);
MessageDispatcher.AddListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.AddListener("FRISTAID_MAN_COMMAND", FristAidTrapped);
MessageDispatcher.AddListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); MessageDispatcher.AddListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint);
@ -203,7 +203,7 @@ public class TrappedMoveFree : MonoBehaviour
public void OnDestroy() public void OnDestroy()
{ {
// MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); // MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex);
MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); //MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute);
MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped);
MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped);
MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint);
@ -219,7 +219,7 @@ public class TrappedMoveFree : MonoBehaviour
public void OnDisable() public void OnDisable()
{ {
//MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); //MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex);
MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); // MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute);
MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped);
MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped);
MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint);

13
Assets/Scripts/DongYouLiQing/4GMap/FourthGCamCtrl.cs

@ -4,7 +4,8 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class FourthGCamCtrl : MonoBehaviour { public class FourthGCamCtrl : MonoBehaviour
{
public Vector3 QuaterView = Vector3.zero; public Vector3 QuaterView = Vector3.zero;
public float InitY; public float InitY;
private static FourthGCamCtrl instance; private static FourthGCamCtrl instance;
@ -26,15 +27,16 @@ public class FourthGCamCtrl : MonoBehaviour {
private Transform target; private Transform target;
private Vector3 preTargetPosition; private Vector3 preTargetPosition;
private bool lookOver = false; private bool lookOver = false;
private float height = 3; //查看人员模式下,摄像机高度 private float height = 1.5f; //查看人员模式下,摄像机高度
private float distance = 2; //查看人员模式下,人与摄像机之间的距离 private float distance = 2; //查看人员模式下,人与摄像机之间的距离
private float dampTrace = 20.0f; //查看人员模式下,摄像机平滑追踪的变量 private float dampTrace = 20.0f; //查看人员模式下,摄像机平滑追踪的变量
private float lookingAtHeight = 3.5f; private float lookingAtHeight = 2f;
private float lookingAtDistance = 5; private float lookingAtDistance = 5;
private bool isQuading = false; private bool isQuading = false;
// Use this for initialization // Use this for initialization
void Start () { void Start()
{
MessageDispatcher.AddListener("OpenFourthG", EnableCamera); MessageDispatcher.AddListener("OpenFourthG", EnableCamera);
MessageDispatcher.AddListener("QuadrupleMode", DisableCamera); MessageDispatcher.AddListener("QuadrupleMode", DisableCamera);
MessageDispatcher.AddListener("4GNobodySelected", NobodySelected); MessageDispatcher.AddListener("4GNobodySelected", NobodySelected);
@ -103,7 +105,8 @@ public class FourthGCamCtrl : MonoBehaviour {
cam.enabled = !value; cam.enabled = !value;
} }
// Update is called once per frame // Update is called once per frame
void Update () { void Update()
{
//有目标人员并且相机激活时才执行 //有目标人员并且相机激活时才执行
if (target != null && cam.enabled == true) if (target != null && cam.enabled == true)
{ {

7
Assets/Scripts/DongYouLiQing/4GMap/QuadCamera.cs

@ -4,14 +4,15 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class QuadCamera : MonoBehaviour { public class QuadCamera : MonoBehaviour
{
public CloneGameObjInfo info; public CloneGameObjInfo info;
public Transform target; public Transform target;
private Camera myCam; private Camera myCam;
private float height = 3; //查看人员模式下,摄像机高度 private float height = 1.5f; //查看人员模式下,摄像机高度
private float distance = 2; //查看人员模式下,人与摄像机之间的距离 private float distance = 2; //查看人员模式下,人与摄像机之间的距离
private float dampTrace = 20.0f; //查看人员模式下,摄像机平滑追踪的变量 private float dampTrace = 20.0f; //查看人员模式下,摄像机平滑追踪的变量
private float lookingAtHeight = 3.5f; private float lookingAtHeight = 2f;
private float lookingAtDistance = 5; private float lookingAtDistance = 5;
void Awake() void Awake()
{ {

15
Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/FireFightNormal.cs

@ -98,6 +98,20 @@ public class FireFightNormal : MonoBehaviour
if (SpreadFireController.fireStruckContainDic[mainFireId].Contains(this)) if (SpreadFireController.fireStruckContainDic[mainFireId].Contains(this))
{ {
SpreadFireController.fireStruckContainDic[mainFireId].Remove(this); SpreadFireController.fireStruckContainDic[mainFireId].Remove(this);
if (SpreadFireController.fireStruckContainDic[mainFireId].Count < 1)
{
EntitiesManager.Instance.DeleteObj(EntitiesManager.Instance.GetEntityByID(mainFireId));
if (GameSettings.othersSettings.mode != Mode.DisasterManagement)
{
if (CurrentUserInfo.room != null && CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id)
{
BaseNetworkSyncDate arg = new BaseNetworkSyncDate();
arg.SendUserID = CurrentUserInfo.mySelf.Id;
arg.gameObjID = mainFireId;
NetworkManager.Default.SendAsync("OBJ_DELECT_SYNC", arg);
}
}
}
} }
} }
@ -187,6 +201,7 @@ public class FireFightNormal : MonoBehaviour
transform.GetChild(i).gameObject.SetActive(false); transform.GetChild(i).gameObject.SetActive(false);
} }
GetComponent<Collider>().enabled = false; GetComponent<Collider>().enabled = false;
SpreadFireController.fireStruckContainDic[baseinfo.gameObjID].Remove(this);
} }
} }

4
Assets/Scripts/DongYouLiQing/BaseCommander/WaterFightFire/SpreadFireController.cs

@ -190,7 +190,8 @@ public class SpreadFireController : MonoBehaviour
} }
//如果可以控制住 //如果可以控制住
if (waterControlArea >= fireArea)
if (waterControlArea > fireArea)
{ {
mainfire.GetComponent<FireSpreadCtrl>().BeController = true; mainfire.GetComponent<FireSpreadCtrl>().BeController = true;
@ -199,6 +200,7 @@ public class SpreadFireController : MonoBehaviour
{ {
mainfire.GetComponent<FireSpreadCtrl>().BeController = false; mainfire.GetComponent<FireSpreadCtrl>().BeController = false;
} }
} }
} }
} }

Loading…
Cancel
Save