|
|
|
@ -186,7 +186,7 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
public void OnEnable() |
|
|
|
|
{ |
|
|
|
|
//MessageDispatcher.AddListener("SetGuidpathIndex", AddGuidIndex); |
|
|
|
|
MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
// MessageDispatcher.AddListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
MessageDispatcher.AddListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); |
|
|
|
|
MessageDispatcher.AddListener("FRISTAID_MAN_COMMAND", FristAidTrapped); |
|
|
|
|
MessageDispatcher.AddListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); |
|
|
|
@ -203,7 +203,7 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
public void OnDestroy() |
|
|
|
|
{ |
|
|
|
|
// MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); |
|
|
|
|
MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
//MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); |
|
|
|
|
MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); |
|
|
|
|
MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); |
|
|
|
@ -219,7 +219,7 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
public void OnDisable() |
|
|
|
|
{ |
|
|
|
|
//MessageDispatcher.RemoveListener("SetGuidpathIndex", AddGuidIndex); |
|
|
|
|
MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
// MessageDispatcher.RemoveListener("MOVE_MAN_COMMAND", MoveExcute); |
|
|
|
|
MessageDispatcher.RemoveListener("GUIDANCE_MAN_COMMAND", GuidanceTrapped); |
|
|
|
|
MessageDispatcher.RemoveListener("FRISTAID_MAN_COMMAND", FristAidTrapped); |
|
|
|
|
MessageDispatcher.RemoveListener("TRAPPED_MOVE_FOLLOW_GUIDE_POINT_COMMAND", MoveFollowGuidPoint); |
|
|
|
@ -872,9 +872,9 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
if (guidPoint.Count == 1 /*&& Vector3.Distance(transform.position, guidPoint[0]) < 2*/) |
|
|
|
|
{ |
|
|
|
|
if (TargetPosition!=guidPoint[0]) |
|
|
|
|
if (TargetPosition != guidPoint[0]) |
|
|
|
|
{ |
|
|
|
|
Debug.Log("<color=#00aa00ff>" + "sssssssss"+ "</color>"); |
|
|
|
|
Debug.Log("<color=#00aa00ff>" + "sssssssss" + "</color>"); |
|
|
|
|
TargetPosition = guidPoint[0]; |
|
|
|
|
if (CurrentUserInfo.room != null && CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) |
|
|
|
|
{ |
|
|
|
@ -1025,7 +1025,7 @@ public class TrappedMoveFree : MonoBehaviour
|
|
|
|
|
{ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (nav.enabled==false) |
|
|
|
|
if (nav.enabled == false) |
|
|
|
|
{ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|