public void Initialize(IPlayerLoopProcessor playerLoopProcessor)
 {
     _rotateblesAtUpdate      = new List <IRotatable>();
     _rotatablesAtFixedUpdate = new List <IRotatable>();
     PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor);
     PlayerLoopSubscriptionController.SubscribeToLoop();
 }
示例#2
0
 public void Initialize(IPlayerLoopProcessor playerLoopProcessor, Transform cameraTransform)
 {
     PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor);
     PlayerLoopSubscriptionController.SubscribeToLoop();
     GameTransform = cameraTransform;
     RegisterAsTransformOwner();
 }
示例#3
0
 public void Initialize(IPlayerLoopProcessor playerLoopProcessor, Ship playerShip, Camera camera)
 {
     PlayerLoopSubscriptionController = new PlayerLoopSubscriptionController();
     PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor);
     PlayerLoopSubscriptionController.SubscribeToLoop();
     ship    = playerShip;
     _camera = camera;
 }
示例#4
0
 public void Initialize(IPlayer player, Transform view, IPlayerLoopProcessor loopProcessor, GameObject defaultIcon)
 {
     this.player   = player;
     iconPrefab    = defaultIcon;
     GameTransform = view;
     RegisterAsTransformOwner();
     PlayerLoopSubscriptionController.Initialize(this, loopProcessor);
     PlayerLoopSubscriptionController.SubscribeToLoop();
     iconPrefab = Resources.Load("Prefabs/UI/DefaultRadarIcon", typeof(GameObject)) as GameObject;
 }
 public void Initialize(IPlayerLoopProcessor playerLoopProcessor, Labyrinth labyrinth)
 {
     PlayerLoopProcessor = playerLoopProcessor;
     _labyrinth          = labyrinth;
     _effectFactory      = new EffectFactory();
     _collectibleFactory = new CollectibleFactory();
     radar = new Radar();
     RotationManager?.Initialize(playerLoopProcessor);
     InputTranslator?.Initialize(playerLoopProcessor);
     InputListener?.Initialize(InputTranslator);
 }
 public override void Initialize(Transform modelTransform, IPlayerLoopProcessor playerLoopProcessor, StatsDictionary stats, float jumpPower)
 {
     base.Initialize(modelTransform, playerLoopProcessor, stats, jumpPower);
     if (modelTransform.TryGetComponent <Rigidbody>(out var cachedRigidBody))
     {
         ModelRigidbody = cachedRigidBody;
     }
     else
     {
         Debug.LogWarning($"{modelTransform.name} does not contain Rigidbody, which is required by {GetType().Name}." +
                          " Default Rigidbody component will be added now and cleaned up during Shutdown process.");
         ModelRigidbody         = modelTransform.gameObject.AddComponent <Rigidbody>();
         needToCleanUpRigidbody = true;
     }
 }
 public virtual void Initialize(Transform gameTransform, IPlayerLoopProcessor playerLoopProcessor, StatsDictionary stats, float jumpPower)
 {
     GameTransform = gameTransform;
     RegisterAsTransformOwner();
     MaxMoveSpeed = 50f;
     JumpPower    = jumpPower;
     InitializeStats(stats);
     SubscribeForSpeedChange();
     SubscribeJumpPowerChange();
     PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor);
     PlayerLoopSubscriptionController.SubscribeToLoop();
     if (effectController == null)
     {
         effectController = new EffectController(this);
     }
 }
 public void Initialize(IPlayerLoopProcessor loopProcessor)
 {
     PlayerLoopSubscriptionController?.Initialize(this, loopProcessor);
     PlayerLoopSubscriptionController?.SubscribeToLoop();
 }
 public void Shutdown()
 {
     UnsubscribeFromLoop();
     PlayerLoopUser      = null;
     PlayerLoopProcessor = null;
 }
 public void Initialize(IPlayerLoop playerLoopUser, IPlayerLoopProcessor loopProcessor)
 {
     PlayerLoopUser      = playerLoopUser;
     PlayerLoopProcessor = loopProcessor;
 }
 public void Initialize()
 {
     _inputListener       = MasterManager.Instance.LinksHolder.InputListener;
     _playerLoopProcessor = MasterManager.Instance.LinksHolder.PlayerLoopProcessor;
     PlayerLoopSubscriptionController.Initialize(this, _playerLoopProcessor);
 }