public void Awake()
 {
     eventChannel         = new EventChannel(Service.Get <EventDispatcher>());
     tracker              = GetComponent <LocomotionTracker>();
     locoEventBroadcaster = GetComponent <LocomotionEventBroadcaster>();
     Assert.IsNotNull(eventChannel, "EventChannel is null");
     Assert.IsNotNull(tracker, "Tracker is null");
 }
示例#2
0
 public virtual void Awake()
 {
     dataEntityCollection         = Service.Get <CPDataEntityCollection>();
     locoEventBroadcaster         = GetComponent <LocomotionEventBroadcaster>();
     dispatcher                   = Service.Get <EventDispatcher>();
     interactRequest              = new ActionRequest(PenguinUserControl.DefaultActionRequestBufferTime);
     locomotionTracker            = GetComponent <LocomotionTracker>();
     currentActionGraphGameObject = null;
 }
示例#3
0
 public void Start()
 {
     if (!SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.IsDestroyed())
     {
         propUser = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PropUser>();
         if (PersistWhenSitting)
         {
             locoEventBroadcaster = propUser.GetComponent <LocomotionEventBroadcaster>();
             locoEventBroadcaster.OnControllerChangedEvent += onControllerChangedEvent;
         }
         propUser.EPropUseStarted += onPropUseStarted;
     }
 }