public void Initialize(IPlayerLoopProcessor playerLoopProcessor, Transform cameraTransform) { PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor); PlayerLoopSubscriptionController.SubscribeToLoop(); GameTransform = cameraTransform; RegisterAsTransformOwner(); }
public void Initialize(Stat stat, StatType type) { if (_isSubscribed) { UnsubscribeFromSource(); } _stat = stat; icon.sprite = MasterManager.Instance.LinksHolder.StatsLibrary.GetStatIcon(type); _maxValue = _stat.MaxValue; _minValue = _stat.MinValue; _currentValue = _stat.CurrentValue; if (_stat is RegenerativeStat statRegen) { _regenStat = statRegen; _regenValue = _regenStat.CurrentRegenerationAmount; regenText.gameObject.SetActive(true); } SubscribeForSource(); UpdateValueText(); UpdateRegenText(); if (changeColor) { content.color = Color.Lerp(lowColor, fullColor, content.fillAmount); } _cameraTransform = MasterManager.Instance.LinksHolder.CameraController.GameTransform; _selfTransform = transform; PlayerLoopSubscriptionController.Initialize(this, MasterManager.Instance.LinksHolder.PlayerLoopProcessor); PlayerLoopSubscriptionController.SubscribeToLoop(); }
public void Initialize(IPlayerLoopProcessor playerLoopProcessor, Ship playerShip, Camera camera) { PlayerLoopSubscriptionController = new PlayerLoopSubscriptionController(); PlayerLoopSubscriptionController.Initialize(this, playerLoopProcessor); PlayerLoopSubscriptionController.SubscribeToLoop(); ship = playerShip; _camera = camera; }
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 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 Initialize() { _inputListener = MasterManager.Instance.LinksHolder.InputListener; _playerLoopProcessor = MasterManager.Instance.LinksHolder.PlayerLoopProcessor; PlayerLoopSubscriptionController.Initialize(this, _playerLoopProcessor); }