Example #1
0
        private void Awake()
        {
            model = FindObjectOfType <FlashlightModel>();
            image = GetComponent <Image>();

            model.FlashlightStateChanged += OnFlashlightStateChanged;
        }
        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();
 }