Ejemplo n.º 1
0
 private void Start()
 {
     rewind = RewindManager.Instance;
     rewind.OnRewindStart += FadeIn;
     rewind.OnRewindEnd   += FadeOut;
     slider.maxValue       = slider.value = RewindManager.REWIND_TIME;
 }
        private void Start()
        {
            rewindManager = RewindManager.Instance;

            rewindManager.OnRewindEnd += StartCooldown;

            textDefaultScale  = cooldownText.transform.localScale;
            imageDefaultScale = cooldownImage.transform.localScale;

            cooldownText.transform.localScale  = textDefaultScale * EFFECT_SCALE_MODIFIER;
            cooldownImage.transform.localScale = imageDefaultScale * EFFECT_SCALE_MODIFIER;
            cooldownText.DOFade(0, 0);

            cooldownImage.material.SetFloat("_FillPercent", 0);
        }
Ejemplo n.º 3
0
        private void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }

            RewindPlayer player = FindObjectOfType <RewindPlayer>();

            if (player)
            {
                player.OnDeath += () => canRewind = false;
            }

            canRewind = true;
        }