コード例 #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;
        }
コード例 #3
0
        private void Awake()
        {
            fillText = GetComponent <Text>();
            model    = FindObjectOfType <FlashlightModel>();

            model.FillAmountChanged += OnFillAmountChanged;

            OnFillAmountChanged(1f);
        }
コード例 #4
0
 private void Awake()
 {
     model = FindObjectOfType <FlashlightModel>();
     model.Off();
 }