Пример #1
0
        private void Awake()
        {
            model = FindObjectOfType <FlashlightModel>();
            image = GetComponent <Image>();

            model.FlashlightStateChanged += OnFlashlightStateChanged;
        }
Пример #2
0
        private void Awake()
        {
            model     = FindObjectOfType <FlashlightModel>();
            fillImage = GetComponent <Image>();

            model.ChargeAmountChanged += OnChargeAmountChanged;
        }
        private void Awake()
        {
            fillText = GetComponent <Text>();
            model    = FindObjectOfType <FlashlightModel>();

            model.FillAmountChanged += OnFillAmountChanged;

            OnFillAmountChanged(1f);
        }
 private void Awake()
 {
     model = FindObjectOfType <FlashlightModel>();
     model.Off();
 }