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"); }
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; }
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; } }