private void Awake() { _fadeIn = FadeIn; _fadeOut = FadeOut; canvasGroup.alpha = 0; _waitSeconds = new WaitSeconds(this, () => StartCoroutine(_fadeOut()), timeShowing); }
private void Awake() { _characterController = GetComponent <CharacterController>(); _rigidBody2D = GetComponent <Rigidbody2D>(); _colliders = new Collider2D[5]; _waitSeconds = new WaitSeconds(this, RegainMovement, timeNotMoving); OnTouchingWall += WallTouched; _characterController.OnLandEvent += OnLand; }
private void Awake() { _camera = FindObjectOfType <CinemachineVirtualCamera>() .GetCinemachineComponent <CinemachineFramingTransposer>(); _hits = new RaycastHit2D[10]; _collider = GetComponent <Collider2D>(); _rigidBody = GetComponent <Rigidbody2D>(); _damageReceiver = GetComponent <DamageReceiver>(); _invincibleWaitTime = new WaitSeconds(this, () => _damageReceiver.Invincible = false, invincibleTime); LastDash = -timeBetweenDashes; }
protected override void Awake() { base.Awake(); _waitSeconds = new WaitSeconds(this, FinishCountdown); }
IEnumerator delayAction(float seconds, Action action) { yield return(WaitSeconds.GetWaits(seconds)); action(); }
protected override void Awake() { base.Awake(); OnTriggerEnter += TriggerEnter; _waitSeconds = new WaitSeconds(this, PlayerExit, timeToDeactivate); }
private void Awake() { ChangeVisibility(false); _waitForHiding = new WaitSeconds(this, () => ChangeVisibility(false), timeShowingHealth); }
protected virtual void Awake() { _waitSeconds = new WaitSeconds(this, PlayerEnter, timeBeforeTriggering); }