mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-07 13:05:41 +00:00
bruh
This commit is contained in:
parent
f2f0266aee
commit
f8f9f26a1c
@ -179,10 +179,26 @@ public class QSBGhostBrain : WorldObject<GhostBrain>, IGhostObject
|
||||
AttachedObject._controller = AttachedObject.GetComponent<GhostController>();
|
||||
AttachedObject._sensors = AttachedObject.GetComponent<GhostSensors>();
|
||||
_data = new();
|
||||
|
||||
AttachedObject._controller.OnArriveAtPosition -= AttachedObject.OnArriveAtPosition;
|
||||
AttachedObject._controller.OnArriveAtPosition += OnArriveAtPosition;
|
||||
|
||||
AttachedObject._controller.OnTraversePathNode -= AttachedObject.OnTraversePathNode;
|
||||
AttachedObject._controller.OnTraversePathNode += OnTraversePathNode;
|
||||
|
||||
AttachedObject._controller.OnFaceNode -= AttachedObject.OnFaceNode;
|
||||
AttachedObject._controller.OnFaceNode += OnFaceNode;
|
||||
|
||||
AttachedObject._controller.OnFinishFaceNodeList -= AttachedObject.OnFinishFaceNodeList;
|
||||
AttachedObject._controller.OnFinishFaceNodeList += OnFinishFaceNodeList;
|
||||
|
||||
if (AttachedObject._data != null)
|
||||
{
|
||||
_data.threatAwareness = AttachedObject._data.threatAwareness;
|
||||
}
|
||||
|
||||
GlobalMessenger.AddListener("EnterDreamWorld", new Callback(OnEnterDreamWorld));
|
||||
GlobalMessenger.AddListener("ExitDreamWorld", new Callback(OnExitDreamWorld));
|
||||
}
|
||||
|
||||
public void Start()
|
||||
@ -212,13 +228,13 @@ public class QSBGhostBrain : WorldObject<GhostBrain>, IGhostObject
|
||||
public void OnDestroy()
|
||||
{
|
||||
AttachedObject._sensors.RemoveEventListeners();
|
||||
AttachedObject._controller.OnArriveAtPosition -= AttachedObject.OnArriveAtPosition;
|
||||
AttachedObject._controller.OnTraversePathNode -= AttachedObject.OnTraversePathNode;
|
||||
AttachedObject._controller.OnFaceNode -= AttachedObject.OnFaceNode;
|
||||
AttachedObject._controller.OnFinishFaceNodeList -= AttachedObject.OnFinishFaceNodeList;
|
||||
AttachedObject._effects.OnCallForHelp -= AttachedObject.OnCallForHelp;
|
||||
GlobalMessenger.RemoveListener("EnterDreamWorld", new Callback(AttachedObject.OnEnterDreamWorld));
|
||||
GlobalMessenger.RemoveListener("ExitDreamWorld", new Callback(AttachedObject.OnExitDreamWorld));
|
||||
AttachedObject._controller.OnArriveAtPosition -= OnArriveAtPosition;
|
||||
AttachedObject._controller.OnTraversePathNode -= OnTraversePathNode;
|
||||
AttachedObject._controller.OnFaceNode -= OnFaceNode;
|
||||
AttachedObject._controller.OnFinishFaceNodeList -= OnFinishFaceNodeList;
|
||||
AttachedObject._effects.OnCallForHelp -= OnCallForHelp;
|
||||
GlobalMessenger.RemoveListener("EnterDreamWorld", new Callback(OnEnterDreamWorld));
|
||||
GlobalMessenger.RemoveListener("ExitDreamWorld", new Callback(OnExitDreamWorld));
|
||||
}
|
||||
|
||||
public void TabulaRasa()
|
||||
|
Loading…
Reference in New Issue
Block a user