Пример #1
0
        private void OnSceneInitialized()
        {
            this.healthInteractor = Game.GetInteractor <PlayerHealthInteractor>();
            this.shieldInteractor = Game.GetInteractor <PlayerShieldInteractor>();

            if (this.shield.activeSelf == false && this.shieldInteractor.Shield > 0)
            {
                this.shield.SetActive(true);
            }
        }
        private void OnSceneInitialized()
        {
            this.healthInteractor = Game.GetInteractor <PlayerHealthInteractor>();
            this.shieldInteractor = Game.GetInteractor <PlayerShieldInteractor>();

            this.healthInteractor.HealthValueChangedEvent += OnHealthValueChanged;
            this.shieldInteractor.ShieldValueChangedEvent += OnShieldValueChanged;

            this.healthBar.maxValue = this.healthInteractor.Health;
            this.shieldBar.maxValue = this.shieldInteractor.Shield;

            this.OnHealthValueChanged(this.healthInteractor.Health);
            this.OnShieldValueChanged(this.shieldInteractor.Shield);
        }
 private void Start()
 {
     this.interactor = Game.GetInteractor <PlayerHealthInteractor>();
     this.Initialize(this.interactor);
 }
 private void Awake()
 {
     this.InitializeBase();
     this.healthInteractor = Game.GetInteractor <PlayerHealthInteractor>();
 }