protected override void OnAwake()
        {
            base.OnAwake();

            positionTransform  = Components.GetComponent <IPositionTransform>().AssertNotNull();
            directionTransform = Components.GetComponent <IDirectionTransform>().AssertNotNull();

            SubscribeToPositionChanged();
            SubscribeToCollisionEnter();

            var presenceSceneProvider = Components.GetComponent <IPresenceSceneProvider>().AssertNotNull();
            var executor = presenceSceneProvider.GetScene().Components.GetComponent <ISceneOrderExecutor>().AssertNotNull();

            executor.GetPreUpdateExecutor().StartCoroutine(MoveMob());
        }
Beispiel #2
0
 public UpdatePositionOperationHandler(IPositionTransform positionTransform, IDirectionTransform directionTransform)
 {
     this.positionTransform  = positionTransform;
     this.directionTransform = directionTransform;
 }